Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
2e314a69
Commit
2e314a69
authored
Oct 26, 2016
by
Jisi Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comments about converting directives into PluginName
parent
59cd5d0e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
command_line_interface.cc
src/google/protobuf/compiler/command_line_interface.cc
+2
-1
No files found.
src/google/protobuf/compiler/command_line_interface.cc
View file @
2e314a69
...
...
@@ -264,6 +264,8 @@ void AddDefaultProtoPaths(vector<pair<string, string> >* paths) {
}
string
PluginName
(
const
string
&
plugin_prefix
,
const
string
&
directive
)
{
// Assuming the directive starts with "--" and ends with "_out" or "_opt",
// strip the "--" and "_out/_opt" and add the plugin prefix.
return
plugin_prefix
+
"gen-"
+
directive
.
substr
(
2
,
directive
.
size
()
-
6
);
}
}
// namespace
...
...
@@ -1485,7 +1487,6 @@ bool CommandLineInterface::GenerateOutput(
HasSuffixString
(
output_directive
.
name
,
"_out"
))
<<
"Bad name for plugin generator: "
<<
output_directive
.
name
;
// Strip the "--" and "_out" and add the plugin prefix.
string
plugin_name
=
PluginName
(
plugin_prefix_
,
output_directive
.
name
);
string
parameters
=
output_directive
.
parameter
;
if
(
!
plugin_parameters_
[
plugin_name
].
empty
())
{
...
...
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