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
dbcfc5e2
Commit
dbcfc5e2
authored
Jun 03, 2015
by
Feng Xiao
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #444 from xfxyjwf/vs2010_fix
Fix two issues on vs2010.
parents
4644f99d
93d6838a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
map.h
src/google/protobuf/map.h
+6
-8
repeated_field.h
src/google/protobuf/repeated_field.h
+3
-1
No files found.
src/google/protobuf/map.h
View file @
dbcfc5e2
...
...
@@ -176,14 +176,12 @@ class Map {
template
<
class
NodeType
>
void
destroy
(
NodeType
*
p
)
{
if
(
arena_
==
NULL
)
p
->~
NodeType
();
p
->~
NodeType
();
}
#else
void
construct
(
pointer
p
,
const_reference
t
)
{
new
(
p
)
value_type
(
t
);
}
void
destroy
(
pointer
p
)
{
if
(
arena_
==
NULL
)
p
->~
value_type
();
}
void
destroy
(
pointer
p
)
{
p
->~
value_type
();
}
#endif
template
<
typename
X
>
...
...
@@ -201,10 +199,10 @@ class Map {
return
arena_
!=
other
.
arena_
;
}
// To support Visual Studio 2008
size_type
max_size
()
const
{
return
std
::
numeric_limits
<
size_type
>::
max
();
}
// To support Visual Studio 2008
size_type
max_size
()
const
{
return
std
::
numeric_limits
<
size_type
>::
max
();
}
private
:
Arena
*
arena_
;
...
...
src/google/protobuf/repeated_field.h
View file @
dbcfc5e2
...
...
@@ -1125,7 +1125,9 @@ template <typename Element>
inline
typename
RepeatedField
<
Element
>::
iterator
RepeatedField
<
Element
>::
erase
(
const_iterator
first
,
const_iterator
last
)
{
size_type
first_offset
=
first
-
cbegin
();
Truncate
(
std
::
copy
(
last
,
cend
(),
begin
()
+
first_offset
)
-
cbegin
());
if
(
first
!=
last
)
{
Truncate
(
std
::
copy
(
last
,
cend
(),
begin
()
+
first_offset
)
-
cbegin
());
}
return
begin
()
+
first_offset
;
}
...
...
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