THRIFT-1406: Build error after applying THRIFT-1395
Client: delphi
Patch: Jens Geyer
Fixes build failure due to t_delphi_generator.cc:780: error: integer constant is too
large for 'long' type
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1189006 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/generate/t_delphi_generator.cc b/compiler/cpp/src/generate/t_delphi_generator.cc
index a7aa64a..cb1aa2e 100644
--- a/compiler/cpp/src/generate/t_delphi_generator.cc
+++ b/compiler/cpp/src/generate/t_delphi_generator.cc
@@ -756,32 +756,16 @@
render << ((value->get_integer() > 0) ? "True" : "False");
break;
case t_base_type::TYPE_BYTE:
- if( 0x7F < value->get_integer()) {
- render << "ShortInt( " << value->get_integer() << ")";
- } else {
- render << value->get_integer();
- }
+ render << "ShortInt( " << value->get_integer() << ")";
break;
case t_base_type::TYPE_I16:
- if( 0x7FFF < value->get_integer()) {
- render << "SmallInt( " << value->get_integer() << ")";
- } else {
- render << value->get_integer();
- }
+ render << "SmallInt( " << value->get_integer() << ")";
break;
case t_base_type::TYPE_I32:
- if( 0x7FFFFFFF < value->get_integer()) {
- render << "LongInt( " << value->get_integer() << ")";
- } else {
- render << value->get_integer();
- }
+ render << "LongInt( " << value->get_integer() << ")";
break;
case t_base_type::TYPE_I64:
- if( 0x7FFFFFFFFFFFFFFF < value->get_integer()) {
- render << "Int64( " << value->get_integer() << ")";
- } else {
- render << value->get_integer();
- }
+ render << "Int64( " << value->get_integer() << ")";
break;
case t_base_type::TYPE_DOUBLE:
if (value->get_type() == t_const_value::CV_INTEGER) {