Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
protobuf-c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
protobuf-c
Commits
b64f6c1f
Commit
b64f6c1f
authored
Feb 14, 2015
by
Ilya Lipnitskiy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
protoc-c/c_enum.cc: Make enum_values_{by_name,by_number} structs static
parent
617fa7ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
protoc-c/c_enum.cc
protoc-c/c_enum.cc
+2
-2
No files found.
protoc-c/c_enum.cc
View file @
b64f6c1f
...
...
@@ -216,7 +216,7 @@ void EnumGenerator::GenerateEnumDescriptor(io::Printer* printer) {
vars
[
"unique_value_count"
]
=
SimpleItoa
(
n_unique_values
);
printer
->
Print
(
vars
,
"const ProtobufCEnumValue $lcclassname$__enum_values_by_number[$unique_value_count$] =
\n
"
"
static
const ProtobufCEnumValue $lcclassname$__enum_values_by_number[$unique_value_count$] =
\n
"
"{
\n
"
);
if
(
descriptor_
->
value_count
()
>
0
)
{
GenerateValueInitializer
(
printer
,
value_index
[
0
].
index
);
...
...
@@ -269,7 +269,7 @@ void EnumGenerator::GenerateEnumDescriptor(io::Printer* printer) {
qsort
(
value_index
,
descriptor_
->
value_count
(),
sizeof
(
ValueIndex
),
compare_value_indices_by_name
);
printer
->
Print
(
vars
,
"const ProtobufCEnumValueIndex $lcclassname$__enum_values_by_name[$value_count$] =
\n
"
"
static
const ProtobufCEnumValueIndex $lcclassname$__enum_values_by_name[$value_count$] =
\n
"
"{
\n
"
);
for
(
int
j
=
0
;
j
<
descriptor_
->
value_count
();
j
++
)
{
vars
[
"index"
]
=
SimpleItoa
(
value_index
[
j
].
final_index
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment