From c20eeaae8296fa9d9de34b07fe8b21cf509c8884 Mon Sep 17 00:00:00 2001 From: Jens Geyer Date: Thu, 7 Aug 2014 22:39:56 +0200 Subject: THRIFT-2589 const of BaseType in IDL generates static instead of const properties Client: C# Patch: Thomas Lazar --- compiler/cpp/src/generate/t_csharp_generator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/cpp') diff --git a/compiler/cpp/src/generate/t_csharp_generator.cc b/compiler/cpp/src/generate/t_csharp_generator.cc index 11db5d675..7944df0ef 100644 --- a/compiler/cpp/src/generate/t_csharp_generator.cc +++ b/compiler/cpp/src/generate/t_csharp_generator.cc @@ -547,7 +547,7 @@ bool t_csharp_generator::print_const_value(std::ofstream& out, string name, t_ty if (!defval || needtype) { out << - (in_static ? "" : "public static ") << + (in_static ? "" : type->is_base_type() ? "public const " : "public static ") << type_name(type) << " "; } if (type->is_base_type()) { -- cgit v1.2.1