mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +00:00
Merge pull request #564 from illwieckz/gcc8
gcc8: static_cast NULL instead of reinterpret_cast
This commit is contained in:
commit
943107012f
1 changed files with 4 additions and 4 deletions
|
@ -480,7 +480,7 @@ void TestStringClass
|
||||||
idStr b; // b.len == 0, b.data == "\0"
|
idStr b; // b.len == 0, b.data == "\0"
|
||||||
idStr c( "test" ); // c.len == 4, c.data == "test\0"
|
idStr c( "test" ); // c.len == 4, c.data == "test\0"
|
||||||
idStr d( c ); // d.len == 4, d.data == "test\0"
|
idStr d( c ); // d.len == 4, d.data == "test\0"
|
||||||
idStr e( reinterpret_cast<const char *>( NULL ) );
|
idStr e( static_cast<const char *>( NULL ) );
|
||||||
// e.len == 0, e.data == "\0" ASSERT!
|
// e.len == 0, e.data == "\0" ASSERT!
|
||||||
int i; // i == ?
|
int i; // i == ?
|
||||||
|
|
||||||
|
@ -499,14 +499,14 @@ void TestStringClass
|
||||||
a = NULL; // a.len == 0, a.data == "\0" ASSERT!
|
a = NULL; // a.len == 0, a.data == "\0" ASSERT!
|
||||||
a = c + d; // a.len == 8, a.data == "testtest\0"
|
a = c + d; // a.len == 8, a.data == "testtest\0"
|
||||||
a = c + "wow"; // a.len == 7, a.data == "testwow\0"
|
a = c + "wow"; // a.len == 7, a.data == "testwow\0"
|
||||||
a = c + reinterpret_cast<const char *>( NULL );
|
a = c + static_cast<const char *>( NULL );
|
||||||
// a.len == 4, a.data == "test\0" ASSERT!
|
// a.len == 4, a.data == "test\0" ASSERT!
|
||||||
a = "this" + d; // a.len == 8, a.data == "thistest\0"
|
a = "this" + d; // a.len == 8, a.data == "thistest\0"
|
||||||
a = reinterpret_cast<const char *>( NULL ) + d;
|
a = static_cast<const char *>( NULL ) + d;
|
||||||
// a.len == 4, a.data == "test\0" ASSERT!
|
// a.len == 4, a.data == "test\0" ASSERT!
|
||||||
a += c; // a.len == 8, a.data == "testtest\0"
|
a += c; // a.len == 8, a.data == "testtest\0"
|
||||||
a += "wow"; // a.len == 11, a.data == "testtestwow\0"
|
a += "wow"; // a.len == 11, a.data == "testtestwow\0"
|
||||||
a += reinterpret_cast<const char *>( NULL );
|
a += static_cast<const char *>( NULL );
|
||||||
// a.len == 11, a.data == "testtestwow\0" ASSERT!
|
// a.len == 11, a.data == "testtestwow\0" ASSERT!
|
||||||
|
|
||||||
a = "test"; // a.len == 4, a.data == "test\0"
|
a = "test"; // a.len == 4, a.data == "test\0"
|
||||||
|
|
Loading…
Reference in a new issue