From: Thomas Debesse Date: Wed, 30 Aug 2017 14:45:11 +0000 (+0000) Subject: gcc8: static_cast NULL instead of reinterpret_cast X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2ceef3535bed49bb44a69aa0e7fbdfaffac001db;p=xonotic%2Fnetradiant.git gcc8: static_cast NULL instead of reinterpret_cast --- diff --git a/libs/splines/util_str.cpp b/libs/splines/util_str.cpp index 2d8554e7..2c5e4945 100644 --- a/libs/splines/util_str.cpp +++ b/libs/splines/util_str.cpp @@ -481,7 +481,7 @@ void TestStringClass idStr b; // b.len == 0, b.data == "\0" idStr c( "test" ); // c.len == 4, c.data == "test\0" idStr d( c ); // d.len == 4, d.data == "test\0" - idStr e( reinterpret_cast( NULL ) ); + idStr e( static_cast( NULL ) ); // e.len == 0, e.data == "\0" ASSERT! int i; // i == ? (void) i; @@ -501,14 +501,14 @@ void TestStringClass a = NULL; // a.len == 0, a.data == "\0" ASSERT! a = c + d; // a.len == 8, a.data == "testtest\0" a = c + "wow"; // a.len == 7, a.data == "testwow\0" - a = c + reinterpret_cast( NULL ); + a = c + static_cast( NULL ); // a.len == 4, a.data == "test\0" ASSERT! a = "this" + d; // a.len == 8, a.data == "thistest\0" - a = reinterpret_cast( NULL ) + d; + a = static_cast( NULL ) + d; // a.len == 4, a.data == "test\0" ASSERT! a += c; // a.len == 8, a.data == "testtest\0" a += "wow"; // a.len == 11, a.data == "testtestwow\0" - a += reinterpret_cast( NULL ); + a += static_cast( NULL ); // a.len == 11, a.data == "testtestwow\0" ASSERT! a = "test"; // a.len == 4, a.data == "test\0"