Thrift: Kill a warning.
authorDavid Reiss <dreiss@apache.org>
Wed, 17 Oct 2007 03:39:55 +0000 (03:39 +0000)
committerDavid Reiss <dreiss@apache.org>
Wed, 17 Oct 2007 03:39:55 +0000 (03:39 +0000)
Summary:
These should always have been const.

Reviewed By: mcslee

Test Plan:
Re-ran the dense protocol test.

Revert Plan: ok

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665303 13f79535-47bb-0310-9956-ffa450edef68

compiler/cpp/src/generate/t_cpp_generator.cc
lib/cpp/src/TReflectionLocal.h

index a92be52..d5f2baf 100644 (file)
@@ -574,10 +574,10 @@ void t_cpp_generator::generate_struct_fingerprint(ofstream& out,
 
   if (tstruct->has_fingerprint()) {
     out <<
-      indent() << stat << "char* " << nspace
+      indent() << stat << "const char* " << nspace
         << "ascii_fingerprint" << comment << "= \"" <<
         tstruct->get_ascii_fingerprint() << "\";" << endl <<
-      indent() << stat << "uint8_t " << nspace <<
+      indent() << stat << "const uint8_t " << nspace <<
         "binary_fingerprint[" << t_type::fingerprint_len << "]" << comment << "= {";
     char* comma = "";
     for (int i = 0; i < t_type::fingerprint_len; i++) {
index 3fe7c63..8e39117 100644 (file)
@@ -59,7 +59,7 @@ struct TypeSpec {
   }
 
   TypeSpec(TType ttype,
-           uint8_t* fingerprint,
+           const uint8_t* fingerprint,
            FieldMeta* metas,
            TypeSpec** specs) :
     ttype(ttype)