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
324779ad
Commit
324779ad
authored
Mar 02, 2012
by
pliard@google.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove static initializer in wire_format_lite.cc.
parent
f5de486b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
coded_stream.h
src/google/protobuf/io/coded_stream.h
+15
-0
wire_format_lite.cc
src/google/protobuf/wire_format_lite.cc
+4
-4
No files found.
src/google/protobuf/io/coded_stream.h
View file @
324779ad
...
@@ -680,6 +680,21 @@ class LIBPROTOBUF_EXPORT CodedOutputStream {
...
@@ -680,6 +680,21 @@ class LIBPROTOBUF_EXPORT CodedOutputStream {
// If negative, 10 bytes. Otheriwse, same as VarintSize32().
// If negative, 10 bytes. Otheriwse, same as VarintSize32().
static
int
VarintSize32SignExtended
(
int32
value
);
static
int
VarintSize32SignExtended
(
int32
value
);
// Compile-time equivalent of VarintSize32().
template
<
uint32
Value
>
struct
StaticVarintSize32
{
static
const
int
value
=
(
Value
<
(
1
<<
7
))
?
1
:
(
Value
<
(
1
<<
14
))
?
2
:
(
Value
<
(
1
<<
21
))
?
3
:
(
Value
<
(
1
<<
28
))
?
4
:
5
;
};
// Returns the total number of bytes written since this object was created.
// Returns the total number of bytes written since this object was created.
inline
int
ByteCount
()
const
;
inline
int
ByteCount
()
const
;
...
...
src/google/protobuf/wire_format_lite.cc
View file @
324779ad
...
@@ -56,10 +56,10 @@ const int WireFormatLite::kMessageSetMessageTag;
...
@@ -56,10 +56,10 @@ const int WireFormatLite::kMessageSetMessageTag;
#endif
#endif
const
int
WireFormatLite
::
kMessageSetItemTagsSize
=
const
int
WireFormatLite
::
kMessageSetItemTagsSize
=
io
::
CodedOutputStream
::
VarintSize32
(
kMessageSetItemStartTag
)
+
io
::
CodedOutputStream
::
StaticVarintSize32
<
kMessageSetItemStartTag
>::
value
+
io
::
CodedOutputStream
::
VarintSize32
(
kMessageSetItemEndTag
)
+
io
::
CodedOutputStream
::
StaticVarintSize32
<
kMessageSetItemEndTag
>::
value
+
io
::
CodedOutputStream
::
VarintSize32
(
kMessageSetTypeIdTag
)
+
io
::
CodedOutputStream
::
StaticVarintSize32
<
kMessageSetTypeIdTag
>::
value
+
io
::
CodedOutputStream
::
VarintSize32
(
kMessageSetMessageTag
)
;
io
::
CodedOutputStream
::
StaticVarintSize32
<
kMessageSetMessageTag
>::
value
;
const
WireFormatLite
::
CppType
const
WireFormatLite
::
CppType
WireFormatLite
::
kFieldTypeToCppTypeMap
[
MAX_FIELD_TYPE
+
1
]
=
{
WireFormatLite
::
kFieldTypeToCppTypeMap
[
MAX_FIELD_TYPE
+
1
]
=
{
...
...
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