diff options
| author | Neil <nyamatongwe@gmail.com> | 2014-05-03 18:01:22 +1000 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2014-05-03 18:01:22 +1000 | 
| commit | 26ff1bba505f093c4755e4afd6eade6c3d582b7f (patch) | |
| tree | ac8b62a5e2a6a614f72915597962ce45002c4b8b /include/Platform.h | |
| parent | 2e2a4ed0d1404f4a874683131e44d381c927c7c3 (diff) | |
| download | scintilla-mirror-26ff1bba505f093c4755e4afd6eade6c3d582b7f.tar.gz | |
Turn on MSVC 'possible loss of data' warnings and add explicit casts.
Diffstat (limited to 'include/Platform.h')
| -rw-r--r-- | include/Platform.h | 16 | 
1 files changed, 8 insertions, 8 deletions
diff --git a/include/Platform.h b/include/Platform.h index 5f8c2f2a1..c9156fc0c 100644 --- a/include/Platform.h +++ b/include/Platform.h @@ -105,6 +105,8 @@ public:  	}  	explicit Point(int x_, int y_) : x(static_cast<XYPOSITION>(x_)), y(static_cast<XYPOSITION>(y_)) {  	} +	explicit Point(long x_, long y_) : x(static_cast<XYPOSITION>(x_)), y(static_cast<XYPOSITION>(y_)) { +	}  	// Other automatically defined methods (assignment, copy constructor, destructor) are fine @@ -123,10 +125,14 @@ public:  	XYPOSITION right;  	XYPOSITION bottom; -	PRectangle(XYPOSITION left_=0, XYPOSITION top_=0, XYPOSITION right_=0, XYPOSITION bottom_ = 0) : +	explicit PRectangle(XYPOSITION left_=0, XYPOSITION top_=0, XYPOSITION right_=0, XYPOSITION bottom_ = 0) :  		left(left_), top(top_), right(right_), bottom(bottom_) {  	} -	PRectangle(int left_, int top_, int right_, int bottom_) : +	explicit PRectangle(int left_, int top_, int right_, int bottom_) : +		left(static_cast<XYPOSITION>(left_)), top(static_cast<XYPOSITION>(top_)), +		right(static_cast<XYPOSITION>(right_)), bottom(static_cast<XYPOSITION>(bottom_)) { +	} +	explicit PRectangle(long left_, long top_, long right_, long bottom_) :  		left(static_cast<XYPOSITION>(left_)), top(static_cast<XYPOSITION>(top_)),  		right(static_cast<XYPOSITION>(right_)), bottom(static_cast<XYPOSITION>(bottom_)) {  	} @@ -524,12 +530,6 @@ public:  }  #endif -// Shut up annoying Visual C++ warnings: -#ifdef _MSC_VER -// This is: conversion from X to Y, possible loss of data -#pragma warning(disable: 4244) -#endif -  #if defined(__GNUC__) && defined(SCINTILLA_QT)  #pragma GCC diagnostic ignored "-Wmissing-field-initializers"  #endif  | 
