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
7ee0f3ed
Commit
7ee0f3ed
authored
Jul 31, 2014
by
jieluo@google.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change some files to pass MSVC 2013
parent
b7aebe40
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
70 additions
and
15 deletions
+70
-15
descriptor.cc
src/google/protobuf/descriptor.cc
+6
-0
extension_set_unittest.cc
src/google/protobuf/extension_set_unittest.cc
+12
-12
repeated_field.h
src/google/protobuf/repeated_field.h
+4
-0
wire_format_lite_inl.h
src/google/protobuf/wire_format_lite_inl.h
+4
-0
extract_includes.bat
vsprojects/extract_includes.bat
+1
-0
libprotobuf.vcproj
vsprojects/libprotobuf.vcproj
+10
-2
libprotoc.vcproj
vsprojects/libprotoc.vcproj
+33
-1
No files found.
src/google/protobuf/descriptor.cc
View file @
7ee0f3ed
...
...
@@ -204,9 +204,11 @@ struct PointerIntegerPairHash {
return
reinterpret_cast
<
intptr_t
>
(
p
.
first
)
*
((
1
<<
16
)
-
1
)
+
p
.
second
;
}
#ifdef _MSC_VER
// Used only by MSVC and platforms where hash_map is not available.
static
const
size_t
bucket_size
=
4
;
static
const
size_t
min_buckets
=
8
;
#endif
inline
bool
operator
()(
const
PairType
&
a
,
const
PairType
&
b
)
const
{
return
a
.
first
<
b
.
first
||
(
a
.
first
==
b
.
first
&&
a
.
second
<
b
.
second
);
...
...
@@ -226,6 +228,10 @@ struct PointerStringPairHash {
}
// Used only by MSVC and platforms where hash_map is not available.
// These two lines produce unused warning, but do not delete them
// unless hash_map is available on MSVC and platforms.
static
const
size_t
bucket_size
=
4
;
static
const
size_t
min_buckets
=
8
;
inline
bool
operator
()(
const
PointerStringPair
&
a
,
const
PointerStringPair
&
b
)
const
{
if
(
a
.
first
<
b
.
first
)
return
true
;
...
...
src/google/protobuf/extension_set_unittest.cc
View file @
7ee0f3ed
...
...
@@ -812,8 +812,8 @@ TEST(ExtensionSetTest, RepeatedFields) {
ASSERT_EQ
(
110
,
SumAllExtensions
<
double
>
(
message
,
unittest
::
repeated_double_extension
,
0
));
typename
RepeatedPtrField
<
::
std
::
string
>::
iterator
string_iter
;
typename
RepeatedPtrField
<
::
std
::
string
>::
iterator
string_end
;
RepeatedPtrField
<
::
std
::
string
>::
iterator
string_iter
;
RepeatedPtrField
<
::
std
::
string
>::
iterator
string_end
;
for
(
string_iter
=
message
.
MutableRepeatedExtension
(
unittest
::
repeated_string_extension
)
->
begin
(),
string_end
=
message
.
MutableRepeatedExtension
(
...
...
@@ -821,8 +821,8 @@ TEST(ExtensionSetTest, RepeatedFields) {
string_iter
!=
string_end
;
++
string_iter
)
{
*
string_iter
+=
"test"
;
}
typename
RepeatedPtrField
<
::
std
::
string
>::
const_iterator
string_const_iter
;
typename
RepeatedPtrField
<
::
std
::
string
>::
const_iterator
string_const_end
;
RepeatedPtrField
<
::
std
::
string
>::
const_iterator
string_const_iter
;
RepeatedPtrField
<
::
std
::
string
>::
const_iterator
string_const_end
;
for
(
string_const_iter
=
message
.
GetRepeatedExtension
(
unittest
::
repeated_string_extension
).
begin
(),
string_const_end
=
message
.
GetRepeatedExtension
(
...
...
@@ -831,8 +831,8 @@ TEST(ExtensionSetTest, RepeatedFields) {
ASSERT_TRUE
(
*
string_iter
==
"testtest"
);
}
typename
RepeatedField
<
unittest
::
TestAllTypes_NestedEnum
>::
iterator
enum_iter
;
typename
RepeatedField
<
unittest
::
TestAllTypes_NestedEnum
>::
iterator
enum_end
;
RepeatedField
<
unittest
::
TestAllTypes_NestedEnum
>::
iterator
enum_iter
;
RepeatedField
<
unittest
::
TestAllTypes_NestedEnum
>::
iterator
enum_end
;
for
(
enum_iter
=
message
.
MutableRepeatedExtension
(
unittest
::
repeated_nested_enum_extension
)
->
begin
(),
enum_end
=
message
.
MutableRepeatedExtension
(
...
...
@@ -840,9 +840,9 @@ TEST(ExtensionSetTest, RepeatedFields) {
enum_iter
!=
enum_end
;
++
enum_iter
)
{
*
enum_iter
=
unittest
::
TestAllTypes
::
NestedEnum_MAX
;
}
typename
RepeatedField
<
unittest
::
TestAllTypes_NestedEnum
>::
const_iterator
RepeatedField
<
unittest
::
TestAllTypes_NestedEnum
>::
const_iterator
enum_const_iter
;
typename
RepeatedField
<
unittest
::
TestAllTypes_NestedEnum
>::
const_iterator
RepeatedField
<
unittest
::
TestAllTypes_NestedEnum
>::
const_iterator
enum_const_end
;
for
(
enum_const_iter
=
message
.
GetRepeatedExtension
(
unittest
::
repeated_nested_enum_extension
).
begin
(),
...
...
@@ -852,9 +852,9 @@ TEST(ExtensionSetTest, RepeatedFields) {
ASSERT_EQ
(
*
enum_const_iter
,
unittest
::
TestAllTypes
::
NestedEnum_MAX
);
}
typename
RepeatedPtrField
<
unittest
::
TestAllTypes_NestedMessage
>::
iterator
RepeatedPtrField
<
unittest
::
TestAllTypes_NestedMessage
>::
iterator
msg_iter
;
typename
RepeatedPtrField
<
unittest
::
TestAllTypes_NestedMessage
>::
iterator
RepeatedPtrField
<
unittest
::
TestAllTypes_NestedMessage
>::
iterator
msg_end
;
for
(
msg_iter
=
message
.
MutableRepeatedExtension
(
unittest
::
repeated_nested_message_extension
)
->
begin
(),
...
...
@@ -863,9 +863,9 @@ TEST(ExtensionSetTest, RepeatedFields) {
msg_iter
!=
msg_end
;
++
msg_iter
)
{
msg_iter
->
set_bb
(
1234
);
}
typename
RepeatedPtrField
<
unittest
::
TestAllTypes_NestedMessage
>::
RepeatedPtrField
<
unittest
::
TestAllTypes_NestedMessage
>::
const_iterator
msg_const_iter
;
typename
RepeatedPtrField
<
unittest
::
TestAllTypes_NestedMessage
>::
RepeatedPtrField
<
unittest
::
TestAllTypes_NestedMessage
>::
const_iterator
msg_const_end
;
for
(
msg_const_iter
=
message
.
GetRepeatedExtension
(
unittest
::
repeated_nested_message_extension
).
begin
(),
...
...
src/google/protobuf/repeated_field.h
View file @
7ee0f3ed
...
...
@@ -46,6 +46,10 @@
#ifndef GOOGLE_PROTOBUF_REPEATED_FIELD_H__
#define GOOGLE_PROTOBUF_REPEATED_FIELD_H__
#ifdef _MSC_VER
#include <algorithm>
#endif
#include <string>
#include <iterator>
#include <google/protobuf/stubs/common.h>
...
...
src/google/protobuf/wire_format_lite_inl.h
View file @
7ee0f3ed
...
...
@@ -36,6 +36,10 @@
#ifndef GOOGLE_PROTOBUF_WIRE_FORMAT_LITE_INL_H__
#define GOOGLE_PROTOBUF_WIRE_FORMAT_LITE_INL_H__
#ifdef _MSC_VER
#include <algorithm>
#endif
#include <string>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/message_lite.h>
...
...
vsprojects/extract_includes.bat
View file @
7ee0f3ed
...
...
@@ -35,6 +35,7 @@ copy ..\src\google\protobuf\wire_format_lite_inl.h include\google\protobuf\wire_
copy ..\src\google\protobuf\io\coded_stream.h include\google\protobuf\io\coded_stream.h
copy ..\src\google\protobuf\io\gzip_stream.h include\google\protobuf\io\gzip_stream.h
copy ..\src\google\protobuf\io\printer.h include\google\protobuf\io\printer.h
copy ..\src\google\protobuf\io\strtod.h include\google\protobuf\io\strtod.h
copy ..\src\google\protobuf\io\tokenizer.h include\google\protobuf\io\tokenizer.h
copy ..\src\google\protobuf\io\zero_copy_stream.h include\google\protobuf\io\zero_copy_stream.h
copy ..\src\google\protobuf\io\zero_copy_stream_impl.h include\google\protobuf\io\zero_copy_stream_impl.h
...
...
vsprojects/libprotobuf.vcproj
View file @
7ee0f3ed
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType=
"Visual C++"
Version=
"9.00"
...
...
@@ -195,6 +195,10 @@
RelativePath=
"..\src\google\protobuf\io\gzip_stream.h"
>
</File>
<File
RelativePath=
"..\src\google\protobuf\io\strtod.h"
>
</File>
<File
RelativePath=
"..\src\google\protobuf\stubs\hash.h"
>
...
...
@@ -204,7 +208,7 @@
>
</File>
<File
RelativePath=
"..\src\google\protobuf\stubs\map
-
util.h"
RelativePath=
"..\src\google\protobuf\stubs\map
_
util.h"
>
</File>
<File
...
...
@@ -367,6 +371,10 @@
RelativePath=
"..\src\google\protobuf\io\gzip_stream.cc"
>
</File>
<File
RelativePath=
"..\src\google\protobuf\io\strtod.cc"
>
</File>
<File
RelativePath=
"..\src\google\protobuf\compiler\importer.cc"
>
...
...
vsprojects/libprotoc.vcproj
View file @
7ee0f3ed
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType=
"Visual C++"
Version=
"9.00"
...
...
@@ -247,10 +247,18 @@
RelativePath=
"..\src\google\protobuf\compiler\java\java_generator.h"
>
</File>
<File
RelativePath=
"..\src\google\protobuf\compiler\java\java_generator_factory.h"
>
</File>
<File
RelativePath=
"..\src\google\protobuf\compiler\java\java_helpers.h"
>
</File>
<File
RelativePath=
"..\src\google\protobuf\compiler\java\java_lazy_message_field.h"
>
</File>
<File
RelativePath=
"..\src\google\protobuf\compiler\java\java_message.h"
>
...
...
@@ -259,6 +267,10 @@
RelativePath=
"..\src\google\protobuf\compiler\java\java_message_field.h"
>
</File>
<File
RelativePath=
"..\src\google\protobuf\compiler\java\java_name_resolver.h"
>
</File>
<File
RelativePath=
"..\src\google\protobuf\compiler\java\java_primitive_field.h"
>
...
...
@@ -267,6 +279,10 @@
RelativePath=
"..\src\google\protobuf\compiler\java\java_service.h"
>
</File>
<File
RelativePath=
"..\src\google\protobuf\compiler\java\java_shared_code_generator.h"
>
</File>
<File
RelativePath=
"..\src\google\protobuf\compiler\java\java_string_field.h"
>
...
...
@@ -391,10 +407,18 @@
RelativePath=
"..\src\google\protobuf\compiler\java\java_generator.cc"
>
</File>
<File
RelativePath=
"..\src\google\protobuf\compiler\java\java_generator_factory.cc"
>
</File>
<File
RelativePath=
"..\src\google\protobuf\compiler\java\java_helpers.cc"
>
</File>
<File
RelativePath=
"..\src\google\protobuf\compiler\java\java_lazy_message_field.cc"
>
</File>
<File
RelativePath=
"..\src\google\protobuf\compiler\java\java_message.cc"
>
...
...
@@ -403,6 +427,10 @@
RelativePath=
"..\src\google\protobuf\compiler\java\java_message_field.cc"
>
</File>
<File
RelativePath=
"..\src\google\protobuf\compiler\java\java_name_resolver.cc"
>
</File>
<File
RelativePath=
"..\src\google\protobuf\compiler\java\java_primitive_field.cc"
>
...
...
@@ -411,6 +439,10 @@
RelativePath=
"..\src\google\protobuf\compiler\java\java_service.cc"
>
</File>
<File
RelativePath=
"..\src\google\protobuf\compiler\java\java_shared_code_generator.cc"
>
</File>
<File
RelativePath=
"..\src\google\protobuf\compiler\java\java_string_field.cc"
>
...
...
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