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
7e9020fb
Commit
7e9020fb
authored
Feb 26, 2015
by
Jisi Liu
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #185 from mzhaom/remove-unused
Remove unused methods:
parents
a779ae60
d1ef42a8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
26 deletions
+1
-26
cpp_message.cc
src/google/protobuf/compiler/cpp/cpp_message.cc
+0
-4
javanano_primitive_field.cc
...le/protobuf/compiler/javanano/javanano_primitive_field.cc
+1
-22
No files found.
src/google/protobuf/compiler/cpp/cpp_message.cc
View file @
7e9020fb
...
...
@@ -280,10 +280,6 @@ void OptimizePadding(vector<const FieldDescriptor*>* fields) {
}
}
string
MessageTypeProtoName
(
const
FieldDescriptor
*
field
)
{
return
field
->
message_type
()
->
full_name
();
}
// Emits an if-statement with a condition that evaluates to true if |field| is
// considered non-default (will be sent over the wire), for message types
// without true field presence. Should only be called if
...
...
src/google/protobuf/compiler/javanano/javanano_primitive_field.cc
View file @
7e9020fb
...
...
@@ -155,28 +155,6 @@ int FixedSize(FieldDescriptor::Type type) {
return
-
1
;
}
// Return true if the type is a that has variable length
// for instance String's.
bool
IsVariableLenType
(
JavaType
type
)
{
switch
(
type
)
{
case
JAVATYPE_INT
:
return
false
;
case
JAVATYPE_LONG
:
return
false
;
case
JAVATYPE_FLOAT
:
return
false
;
case
JAVATYPE_DOUBLE
:
return
false
;
case
JAVATYPE_BOOLEAN
:
return
false
;
case
JAVATYPE_STRING
:
return
true
;
case
JAVATYPE_BYTES
:
return
true
;
case
JAVATYPE_ENUM
:
return
false
;
case
JAVATYPE_MESSAGE
:
return
true
;
// No default because we want the compiler to complain if any new
// JavaTypes are added.
}
GOOGLE_LOG
(
FATAL
)
<<
"Can't get here."
;
return
false
;
}
bool
AllAscii
(
const
string
&
text
)
{
for
(
int
i
=
0
;
i
<
text
.
size
();
i
++
)
{
if
((
text
[
i
]
&
0x80
)
!=
0
)
{
...
...
@@ -186,6 +164,7 @@ bool AllAscii(const string& text) {
return
true
;
}
void
SetPrimitiveVariables
(
const
FieldDescriptor
*
descriptor
,
const
Params
params
,
map
<
string
,
string
>*
variables
)
{
(
*
variables
)[
"name"
]
=
...
...
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