added wx_truncate_cast and use it (sometimes instead of wx_static_cast) to explicitely show int truncation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -292,6 +292,13 @@ typedef int wxWindowID;
|
||||
#define wx_reinterpret_cast(t, x) ((t)(x))
|
||||
#endif
|
||||
|
||||
/*
|
||||
This one is a wx invention: like static cast but used when we intentionally
|
||||
truncate from a larger to smaller type, static_cast<> can't be used for it
|
||||
as it results in warnings when using some compilers (SGI mipspro for example)
|
||||
*/
|
||||
#define wx_truncate_cast(t, x) ((t)(x))
|
||||
|
||||
/* for consistency with wxStatic/DynamicCast defined in wx/object.h */
|
||||
#define wxConstCast(obj, className) wx_const_cast(className *, obj)
|
||||
|
||||
|
Reference in New Issue
Block a user