Explorar o código

Fix illegal C++ use of reinterpret_cast<> to cast between nullptr_t and a pointer.

Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) %!s(int64=10) %!d(string=hai) anos
pai
achega
f01c1441bc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/google/protobuf/compiler/cpp/cpp_service.cc

+ 1 - 1
src/google/protobuf/compiler/cpp/cpp_service.cc

@@ -301,7 +301,7 @@ void ServiceGenerator::GenerateGetPrototype(RequestOrResponse which,
   printer->Print(vars_,
     "    default:\n"
     "      GOOGLE_LOG(FATAL) << \"Bad method index; this should never happen.\";\n"
-    "      return *reinterpret_cast< ::google::protobuf::Message*>(NULL);\n"
+    "      return *static_cast< ::google::protobuf::Message*>(NULL);\n"
     "  }\n"
     "}\n"
     "\n");