mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-08 06:05:17 +00:00
* Fix C/C++ Create<Type>Direct with sorted vectors If a struct has a key the vector has to be sorted. To sort the vector you can't use "const". * Changes due to code review * Improve code readability * Add generate of JSON schema to string to lib * option indent_step is supported * Remove unused variables * Fix break in test * Fix style to be consistent with rest of the code * [C#] Fix field name struct name collision (#6744)
This commit is contained in:
@@ -619,6 +619,7 @@ class CSharpGenerator : public BaseGenerator {
|
||||
std::string dest_cast = DestinationCast(field.value.type);
|
||||
std::string src_cast = SourceCast(field.value.type);
|
||||
std::string field_name_camel = MakeCamel(field.name, true);
|
||||
if (field_name_camel == struct_def.name) { field_name_camel += "_"; }
|
||||
std::string method_start =
|
||||
" public " + type_name_dest + optional + " " + field_name_camel;
|
||||
std::string obj = "(new " + type_name + "())";
|
||||
|
||||
Reference in New Issue
Block a user