diff options
Diffstat (limited to 'src/XPM.h')
| -rw-r--r-- | src/XPM.h | 26 | 
1 files changed, 13 insertions, 13 deletions
| @@ -20,7 +20,7 @@ class XPM {  	std::vector<unsigned char> pixels;  	ColourDesired colourCodeTable[256];  	char codeTransparent=' '; -	ColourDesired ColourFromCode(int ch) const; +	ColourDesired ColourFromCode(int ch) const noexcept;  	void FillRun(Surface *surface, int code, int startX, int y, int x) const;  public:  	explicit XPM(const char *textForm); @@ -34,9 +34,9 @@ public:  	void Init(const char *const *linesForm);  	/// Decompose image into runs and use FillRectangle for each run  	void Draw(Surface *surface, const PRectangle &rc); -	int GetHeight() const { return height; } -	int GetWidth() const { return width; } -	void PixelAt(int x, int y, ColourDesired &colour, bool &transparent) const; +	int GetHeight() const noexcept { return height; } +	int GetWidth() const noexcept { return width; } +	void PixelAt(int x, int y, ColourDesired &colour, bool &transparent) const noexcept;  private:  	static std::vector<const char *>LinesFormFromTextForm(const char *textForm);  }; @@ -58,14 +58,14 @@ public:  	RGBAImage &operator=(const RGBAImage &) = default;  	RGBAImage &operator=(RGBAImage &&) noexcept = default;  	virtual ~RGBAImage(); -	int GetHeight() const { return height; } -	int GetWidth() const { return width; } -	float GetScale() const { return scale; } -	float GetScaledHeight() const { return height / scale; } -	float GetScaledWidth() const { return width / scale; } -	int CountBytes() const; -	const unsigned char *Pixels() const; -	void SetPixel(int x, int y, ColourDesired colour, int alpha); +	int GetHeight() const noexcept { return height; } +	int GetWidth() const noexcept { return width; } +	float GetScale() const noexcept { return scale; } +	float GetScaledHeight() const noexcept { return height / scale; } +	float GetScaledWidth() const noexcept { return width / scale; } +	int CountBytes() const noexcept; +	const unsigned char *Pixels() const noexcept; +	void SetPixel(int x, int y, ColourDesired colour, int alpha) noexcept;  	static void BGRAFromRGBA(unsigned char *pixelsBGRA, const unsigned char *pixelsRGBA, size_t count) noexcept;  }; @@ -86,7 +86,7 @@ public:  	RGBAImageSet &operator=(RGBAImageSet &&) = delete;  	~RGBAImageSet();  	/// Remove all images. -	void Clear(); +	void Clear() noexcept;  	/// Add an image.  	void Add(int ident, RGBAImage *image);  	/// Get image by id. | 
