|
@@ -124,8 +124,7 @@ void ProtobufSourceGenerator::printConstructor()
|
|
|
for (int i = 0; i < mMessage->field_count(); i++) {
|
|
|
const FieldDescriptor *field = mMessage->field(i);
|
|
|
std::string fieldTypeName = getTypeName(field, mMessage);
|
|
|
- std::string fieldName = field->name();
|
|
|
- fieldName[0] = static_cast<char>(::tolower(fieldName[0]));
|
|
|
+ std::string fieldName = utils::lowerCaseName(field->name());
|
|
|
fieldName = qualifiedName(fieldName);
|
|
|
|
|
|
if (field->is_repeated() || field->is_map()) {
|
|
@@ -170,9 +169,8 @@ void ProtobufSourceGenerator::printConstructor()
|
|
|
{"parameter_list", parameters}}, Templates::ProtoConstructorDefinitionTemplate);
|
|
|
for (size_t j = 0; j < parameterList.size(); j++) {
|
|
|
const FieldDescriptor *field = mMessage->field(j);
|
|
|
- std::string fieldName = field->name();
|
|
|
+ std::string fieldName = utils::lowerCaseName(field->name());
|
|
|
auto fieldTypeName = getTypeName(field, mMessage);
|
|
|
- fieldName[0] = static_cast<char>(::tolower(fieldName[0]));
|
|
|
fieldName = qualifiedName(fieldName);
|
|
|
if (field->type() == FieldDescriptor::TYPE_MESSAGE
|
|
|
&& !field->is_map() && !field->is_repeated()) {
|
|
@@ -229,9 +227,8 @@ void ProtobufSourceGenerator::printCopyFunctionality()
|
|
|
Templates::CopyConstructorDefinitionTemplate);
|
|
|
for (int j = 0; j < mMessage->field_count(); j++) {
|
|
|
const FieldDescriptor *field = mMessage->field(j);
|
|
|
- std::string fieldName = field->name();
|
|
|
+ std::string fieldName = utils::lowerCaseName(field->name());
|
|
|
auto fieldTypeName = getTypeName(field, mMessage);
|
|
|
- fieldName[0] = static_cast<char>(::tolower(fieldName[0]));
|
|
|
fieldName = qualifiedName(fieldName);
|
|
|
|
|
|
if (field->type() == FieldDescriptor::TYPE_MESSAGE
|
|
@@ -276,9 +273,8 @@ void ProtobufSourceGenerator::printMoveSemantic()
|
|
|
Templates::MoveConstructorDefinitionTemplate);
|
|
|
for (int j = 0; j < mMessage->field_count(); j++) {
|
|
|
const FieldDescriptor *field = mMessage->field(j);
|
|
|
- std::string fieldName = field->name();
|
|
|
+ std::string fieldName = utils::lowerCaseName(field->name());
|
|
|
auto fieldTypeName = getTypeName(field, mMessage);
|
|
|
- fieldName[0] = static_cast<char>(::tolower(fieldName[0]));
|
|
|
fieldName = qualifiedName(fieldName);
|
|
|
|
|
|
if (field->type() == FieldDescriptor::TYPE_MESSAGE
|