aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/XPM.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2013-12-15 12:49:06 +1100
committerNeil <nyamatongwe@gmail.com>2013-12-15 12:49:06 +1100
commitb4c46f78da230ff3077bc2b96ac66f5ac017c7a2 (patch)
tree3a06d1dc7b2deb5e25d5e148666f086fb0864ff4 /src/XPM.h
parent982a9be5d39fb042e1deb86af5930cb54729f83f (diff)
downloadscintilla-mirror-b4c46f78da230ff3077bc2b96ac66f5ac017c7a2.tar.gz
Make single argument constructors explicit to avoid unexpected conversions.
Diffstat (limited to 'src/XPM.h')
-rw-r--r--src/XPM.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/XPM.h b/src/XPM.h
index 2648fecd9..47f5c52f1 100644
--- a/src/XPM.h
+++ b/src/XPM.h
@@ -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; }