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
cb6dd4ef
Commit
cb6dd4ef
authored
Jul 05, 2011
by
liujisi@google.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A workaround for MSVC 2010 x64 platform bug,
which affects proto compiler in generating field has_bit mask.
parent
2a89d002
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
strutil.cc
src/google/protobuf/stubs/strutil.cc
+7
-0
No files found.
src/google/protobuf/stubs/strutil.cc
View file @
cb6dd4ef
...
...
@@ -670,7 +670,14 @@ char *InternalFastHexToBuffer(uint64 value, char* buffer, int num_byte) {
static
const
char
*
hexdigits
=
"0123456789abcdef"
;
buffer
[
num_byte
]
=
'\0'
;
for
(
int
i
=
num_byte
-
1
;
i
>=
0
;
i
--
)
{
#ifdef _M_X64
// MSVC x64 platform has a bug optimizing the uint32(value) in the #else
// block. Given that the uint32 cast was to improve performance on 32-bit
// platforms, we use 64-bit '&' directly.
buffer
[
i
]
=
hexdigits
[
value
&
0xf
];
#else
buffer
[
i
]
=
hexdigits
[
uint32
(
value
)
&
0xf
];
#endif
value
>>=
4
;
}
return
buffer
;
...
...
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