diff options
author | Neil <nyamatongwe@gmail.com> | 2013-12-15 12:49:06 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2013-12-15 12:49:06 +1100 |
commit | b4c46f78da230ff3077bc2b96ac66f5ac017c7a2 (patch) | |
tree | 3a06d1dc7b2deb5e25d5e148666f086fb0864ff4 /src/XPM.h | |
parent | 982a9be5d39fb042e1deb86af5930cb54729f83f (diff) | |
download | scintilla-mirror-b4c46f78da230ff3077bc2b96ac66f5ac017c7a2.tar.gz |
Make single argument constructors explicit to avoid unexpected conversions.
Diffstat (limited to 'src/XPM.h')
-rw-r--r-- | src/XPM.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -25,8 +25,8 @@ class XPM { ColourDesired ColourFromCode(int ch) const; void FillRun(Surface *surface, int code, int startX, int y, int x); public: - XPM(const char *textForm); - XPM(const char *const *linesForm); + explicit XPM(const char *textForm); + explicit XPM(const char *const *linesForm); ~XPM(); void Init(const char *textForm); void Init(const char *const *linesForm); @@ -53,7 +53,7 @@ class RGBAImage { std::vector<unsigned char> pixelBytes; public: RGBAImage(int width_, int height_, float scale_, const unsigned char *pixels_); - RGBAImage(const XPM &xpm); + explicit RGBAImage(const XPM &xpm); virtual ~RGBAImage(); int GetHeight() const { return height; } int GetWidth() const { return width; } |