diff options
author | kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2009-07-29 21:33:08 +0000 |
---|---|---|
committer | kenton@google.com <kenton@google.com@630680e5-0e50-0410-840e-4b1c322b438d> | 2009-07-29 21:33:08 +0000 |
commit | 4f3491ee5f0d2e6301988fa81714cce32ea4b461 (patch) | |
tree | 1b326068af7e39add870b186ced3e051d96e6600 /src/google/protobuf/message_lite.cc | |
parent | 858a22be1122bf72ffd048f97c9d58d423cc41a1 (diff) | |
download | protobuf-4f3491ee5f0d2e6301988fa81714cce32ea4b461.tar.gz protobuf-4f3491ee5f0d2e6301988fa81714cce32ea4b461.tar.bz2 protobuf-4f3491ee5f0d2e6301988fa81714cce32ea4b461.zip |
Decouple strutil from C++ lite library for a further 23k reduction.
Diffstat (limited to 'src/google/protobuf/message_lite.cc')
-rw-r--r-- | src/google/protobuf/message_lite.cc | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/google/protobuf/message_lite.cc b/src/google/protobuf/message_lite.cc index 5e156f25..a53740ad 100644 --- a/src/google/protobuf/message_lite.cc +++ b/src/google/protobuf/message_lite.cc @@ -39,7 +39,6 @@ #include <google/protobuf/stubs/common.h> #include <google/protobuf/io/coded_stream.h> #include <google/protobuf/io/zero_copy_stream_impl.h> -#include <google/protobuf/stubs/substitute.h> #include <google/protobuf/stubs/stl_util-inl.h> namespace google { @@ -55,11 +54,23 @@ namespace { string InitializationErrorMessage(const char* action, const MessageLite& message) { - return strings::Substitute( - "Can't $0 message of type \"$1\" because it is missing required " - "fields: $2", - action, message.GetTypeName(), - message.InitializationErrorString()); + // Note: We want to avoid depending on strutil in the lite library, otherwise + // we'd use: + // + // return strings::Substitute( + // "Can't $0 message of type \"$1\" because it is missing required " + // "fields: $2", + // action, message.GetTypeName(), + // message.InitializationErrorString()); + + string result; + result += "Can't "; + result += action; + result += " message of type \""; + result += message.GetTypeName(); + result += "\" because it is missing required fields: "; + result += message.InitializationErrorString(); + return result; } // Several of the Parse methods below just do one thing and then call another |