Commit 613b3675 authored by Andrei Nigmatulin's avatar Andrei Nigmatulin Committed by Robert Edmonds

fixed gcc warnings 'integer constant is so large that it is unsigned' for...

fixed gcc warnings 'integer constant is so large that it is unsigned' for large 64 bit constants (default values)
parent e1e044da
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment