fixed gcc warnings 'integer constant is so large that it is unsigned' for large 64 bit constants (default values)

This commit is contained in:
Andrei Nigmatulin 2012-12-13 15:24:18 +00:00 committed by Robert Edmonds
parent e1e044da01
commit 613b367596

View File

@ -130,11 +130,11 @@ string PrimitiveFieldGenerator::GetDefaultValue() const
case FieldDescriptor::CPPTYPE_INT32:
return SimpleItoa(descriptor_->default_value_int32());
case FieldDescriptor::CPPTYPE_INT64:
return SimpleItoa(descriptor_->default_value_int64());
return SimpleItoa(descriptor_->default_value_int64()) + "ll";
case FieldDescriptor::CPPTYPE_UINT32:
return SimpleItoa(descriptor_->default_value_uint32());
return SimpleItoa(descriptor_->default_value_uint32()) + "u";
case FieldDescriptor::CPPTYPE_UINT64:
return SimpleItoa(descriptor_->default_value_uint64());
return SimpleItoa(descriptor_->default_value_uint64()) + "ull";
case FieldDescriptor::CPPTYPE_FLOAT:
return SimpleFtoa(descriptor_->default_value_float());
case FieldDescriptor::CPPTYPE_DOUBLE: