Skip to content

Commit

Permalink
workon
Browse files Browse the repository at this point in the history
  • Loading branch information
Yury Klushin committed Feb 14, 2024
1 parent 3848c74 commit 3c2c1cf
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/audio-sdlmixer.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ExceptionSDLmixer : public ExceptionAudio {
explicit ExceptionSDLmixer(const std::string &description);
virtual ~ExceptionSDLmixer() {}

virtual std::string get_platform() const { return "SDL_mixer"; }
virtual const std::string get_platform() const { return "SDL_mixer"; }
};

class AudioSDL : public Audio, public Audio::VolumeController {
Expand Down
2 changes: 1 addition & 1 deletion src/audio.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ExceptionAudio::ExceptionAudio(const std::string &description) :
ExceptionAudio::~ExceptionAudio() {
}

std::string
const std::string
ExceptionAudio::get_description() const {
return "[" + get_system() + ":" + get_platform() + "] " + description.c_str();
}
Expand Down
6 changes: 3 additions & 3 deletions src/audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ class ExceptionAudio : public ExceptionFreeserf {
explicit ExceptionAudio(const std::string &description);
virtual ~ExceptionAudio();

virtual std::string get_description() const;
virtual std::string get_platform() const { return "Abstract"; }
virtual std::string get_system() const { return "audio"; }
virtual const std::string get_description() const;
virtual const std::string get_platform() const { return "Abstract"; }
virtual const std::string get_system() const { return "audio"; }
};

class Audio {
Expand Down
10 changes: 5 additions & 5 deletions src/debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@

#include "src/debug.h"

ExceptionFreeserf::ExceptionFreeserf(const std::string &description_) throw()
: description(description_) {
ExceptionFreeserf::ExceptionFreeserf(const std::string &description_) throw() {
description = "[" + get_system() + "] " + description_;
}

ExceptionFreeserf::~ExceptionFreeserf() {
}

const char*
ExceptionFreeserf::what() const throw() {
return get_description().c_str();
return description.c_str();
}

std::string
const std::string
ExceptionFreeserf::get_description() const {
return "[" + get_system() + "] " + description;
return description;
}
4 changes: 2 additions & 2 deletions src/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class ExceptionFreeserf : public std::exception {
virtual ~ExceptionFreeserf();

virtual const char* what() const throw();
virtual std::string get_description() const;
virtual std::string get_system() const { return "Unspecified"; }
virtual const std::string get_description() const;
virtual const std::string get_system() const { return "Unspecified"; }
};

#ifndef NDEBUG
Expand Down
2 changes: 1 addition & 1 deletion src/gfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ExceptionGFX : public ExceptionFreeserf {
explicit ExceptionGFX(const std::string &description);
virtual ~ExceptionGFX();

virtual std::string get_system() const { return "graphics"; }
virtual const std::string get_system() const { return "graphics"; }
};

class Color {
Expand Down
2 changes: 1 addition & 1 deletion src/video-sdl.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class ExceptionSDL : public ExceptionVideo {
explicit ExceptionSDL(const std::string &description) throw();
virtual ~ExceptionSDL() {}

virtual std::string get_platform() const { return "SDL"; }
virtual const std::string get_platform() const { return "SDL"; }
};

class VideoSDL : public Video {
Expand Down
2 changes: 1 addition & 1 deletion src/video.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ExceptionVideo::ExceptionVideo(const std::string &description) :
ExceptionVideo::~ExceptionVideo() {
}

std::string
const std::string
ExceptionVideo::get_description() const {
return "[" + get_system() + ":" + get_platform() + "] " + description.c_str();
}
6 changes: 3 additions & 3 deletions src/video.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ class ExceptionVideo : public ExceptionFreeserf {
explicit ExceptionVideo(const std::string &description);
virtual ~ExceptionVideo();

virtual std::string get_description() const;
virtual std::string get_platform() const { return "Abstract"; }
virtual std::string get_system() const { return "video"; }
virtual const std::string get_description() const;
virtual const std::string get_platform() const { return "Abstract"; }
virtual const std::string get_system() const { return "video"; }
};

class Video {
Expand Down

0 comments on commit 3c2c1cf

Please sign in to comment.