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
034e603d
Commit
034e603d
authored
Mar 11, 2018
by
Fredrik Gustafsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add std:: to some types
This is required for compilation to succeed on debian jessie with g++ 6.3.0.
parent
dac1a65f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
protoc-c/c_file.h
protoc-c/c_file.h
+1
-1
protoc-c/c_generator.cc
protoc-c/c_generator.cc
+4
-4
protoc-c/c_helpers.cc
protoc-c/c_helpers.cc
+6
-6
No files found.
protoc-c/c_file.h
View file @
034e603d
...
...
@@ -104,7 +104,7 @@ class FileGenerator {
scoped_array
<
scoped_ptr
<
ExtensionGenerator
>
>
extension_generators_
;
// E.g. if the package is foo.bar, package_parts_ is {"foo", "bar"}.
vector
<
string
>
package_parts_
;
std
::
vector
<
string
>
package_parts_
;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
(
FileGenerator
);
};
...
...
protoc-c/c_generator.cc
View file @
034e603d
...
...
@@ -80,13 +80,13 @@ namespace c {
// "foo=bar,baz,qux=corge"
// parses to the pairs:
// ("foo", "bar"), ("baz", ""), ("qux", "corge")
void
ParseOptions
(
const
string
&
text
,
vector
<
pair
<
string
,
string
>
>*
output
)
{
vector
<
string
>
parts
;
void
ParseOptions
(
const
string
&
text
,
std
::
vector
<
std
::
pair
<
string
,
string
>
>*
output
)
{
std
::
vector
<
string
>
parts
;
SplitStringUsing
(
text
,
","
,
&
parts
);
for
(
unsigned
i
=
0
;
i
<
parts
.
size
();
i
++
)
{
string
::
size_type
equals_pos
=
parts
[
i
].
find_first_of
(
'='
);
pair
<
string
,
string
>
value
;
std
::
pair
<
string
,
string
>
value
;
if
(
equals_pos
==
string
::
npos
)
{
value
.
first
=
parts
[
i
];
value
.
second
=
""
;
...
...
@@ -105,7 +105,7 @@ bool CGenerator::Generate(const FileDescriptor* file,
const
string
&
parameter
,
OutputDirectory
*
output_directory
,
string
*
error
)
const
{
vector
<
pair
<
string
,
string
>
>
options
;
std
::
vector
<
std
::
pair
<
string
,
string
>
>
options
;
ParseOptions
(
parameter
,
&
options
);
// -----------------------------------------------------------------
...
...
protoc-c/c_helpers.cc
View file @
034e603d
...
...
@@ -177,7 +177,7 @@ string ToCamel(const string &name) {
}
string
FullNameToLower
(
const
string
&
full_name
)
{
vector
<
string
>
pieces
;
std
::
vector
<
string
>
pieces
;
SplitStringUsing
(
full_name
,
"."
,
&
pieces
);
string
rv
=
""
;
for
(
unsigned
i
=
0
;
i
<
pieces
.
size
();
i
++
)
{
...
...
@@ -188,7 +188,7 @@ string FullNameToLower(const string &full_name) {
return
rv
;
}
string
FullNameToUpper
(
const
string
&
full_name
)
{
vector
<
string
>
pieces
;
std
::
vector
<
string
>
pieces
;
SplitStringUsing
(
full_name
,
"."
,
&
pieces
);
string
rv
=
""
;
for
(
unsigned
i
=
0
;
i
<
pieces
.
size
();
i
++
)
{
...
...
@@ -199,7 +199,7 @@ string FullNameToUpper(const string &full_name) {
return
rv
;
}
string
FullNameToC
(
const
string
&
full_name
)
{
vector
<
string
>
pieces
;
std
::
vector
<
string
>
pieces
;
SplitStringUsing
(
full_name
,
"."
,
&
pieces
);
string
rv
=
""
;
for
(
unsigned
i
=
0
;
i
<
pieces
.
size
();
i
++
)
{
...
...
@@ -214,7 +214,7 @@ void PrintComment (io::Printer* printer, string comment)
{
if
(
!
comment
.
empty
())
{
vector
<
string
>
comment_lines
;
std
::
vector
<
string
>
comment_lines
;
SplitStringUsing
(
comment
,
"
\r\n
"
,
&
comment_lines
);
printer
->
Print
(
"/*
\n
"
);
for
(
int
i
=
0
;
i
<
comment_lines
.
size
();
i
++
)
...
...
@@ -503,8 +503,8 @@ void SplitStringToIteratorUsing(const string& full,
void
SplitStringUsing
(
const
string
&
full
,
const
char
*
delim
,
vector
<
string
>*
result
)
{
std
::
back_insert_iterator
<
vector
<
string
>
>
it
(
*
result
);
std
::
vector
<
string
>*
result
)
{
std
::
back_insert_iterator
<
std
::
vector
<
string
>
>
it
(
*
result
);
SplitStringToIteratorUsing
(
full
,
delim
,
it
);
}
...
...
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