Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
opencv
Commits
b76a691b
Commit
b76a691b
authored
Jan 05, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3rdparty(protobuf): fix build with Android NDK 16
parent
bc6a3553
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
15 deletions
+15
-15
field_mask_util.cc
...arty/protobuf/src/google/protobuf/util/field_mask_util.cc
+6
-6
type_info.cc
...y/protobuf/src/google/protobuf/util/internal/type_info.cc
+7
-7
message_differencer.cc
.../protobuf/src/google/protobuf/util/message_differencer.cc
+2
-2
No files found.
3rdparty/protobuf/src/google/protobuf/util/field_mask_util.cc
View file @
b76a691b
...
...
@@ -216,14 +216,14 @@ class FieldMaskTree {
~
Node
()
{
ClearChildren
();
}
void
ClearChildren
()
{
for
(
map
<
string
,
Node
*>::
iterator
it
=
children
.
begin
();
for
(
std
::
map
<
string
,
Node
*>::
iterator
it
=
children
.
begin
();
it
!=
children
.
end
();
++
it
)
{
delete
it
->
second
;
}
children
.
clear
();
}
map
<
string
,
Node
*>
children
;
std
::
map
<
string
,
Node
*>
children
;
private
:
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
(
Node
);
...
...
@@ -274,7 +274,7 @@ void FieldMaskTree::MergeToFieldMask(const string& prefix, const Node* node,
out
->
add_paths
(
prefix
);
return
;
}
for
(
map
<
string
,
Node
*>::
const_iterator
it
=
node
->
children
.
begin
();
for
(
std
::
map
<
string
,
Node
*>::
const_iterator
it
=
node
->
children
.
begin
();
it
!=
node
->
children
.
end
();
++
it
)
{
string
current_path
=
prefix
.
empty
()
?
it
->
first
:
prefix
+
"."
+
it
->
first
;
MergeToFieldMask
(
current_path
,
it
->
second
,
out
);
...
...
@@ -339,7 +339,7 @@ void FieldMaskTree::MergeLeafNodesToTree(const string& prefix, const Node* node,
if
(
node
->
children
.
empty
())
{
out
->
AddPath
(
prefix
);
}
for
(
map
<
string
,
Node
*>::
const_iterator
it
=
node
->
children
.
begin
();
for
(
std
::
map
<
string
,
Node
*>::
const_iterator
it
=
node
->
children
.
begin
();
it
!=
node
->
children
.
end
();
++
it
)
{
string
current_path
=
prefix
.
empty
()
?
it
->
first
:
prefix
+
"."
+
it
->
first
;
MergeLeafNodesToTree
(
current_path
,
it
->
second
,
out
);
...
...
@@ -353,7 +353,7 @@ void FieldMaskTree::MergeMessage(const Node* node, const Message& source,
const
Reflection
*
source_reflection
=
source
.
GetReflection
();
const
Reflection
*
destination_reflection
=
destination
->
GetReflection
();
const
Descriptor
*
descriptor
=
source
.
GetDescriptor
();
for
(
map
<
string
,
Node
*>::
const_iterator
it
=
node
->
children
.
begin
();
for
(
std
::
map
<
string
,
Node
*>::
const_iterator
it
=
node
->
children
.
begin
();
it
!=
node
->
children
.
end
();
++
it
)
{
const
string
&
field_name
=
it
->
first
;
const
Node
*
child
=
it
->
second
;
...
...
@@ -456,7 +456,7 @@ void FieldMaskTree::TrimMessage(const Node* node, Message* message) {
const
int32
field_count
=
descriptor
->
field_count
();
for
(
int
index
=
0
;
index
<
field_count
;
++
index
)
{
const
FieldDescriptor
*
field
=
descriptor
->
field
(
index
);
map
<
string
,
Node
*>::
const_iterator
it
=
node
->
children
.
find
(
field
->
name
());
std
::
map
<
string
,
Node
*>::
const_iterator
it
=
node
->
children
.
find
(
field
->
name
());
if
(
it
==
node
->
children
.
end
())
{
reflection
->
ClearField
(
message
,
field
);
}
else
{
...
...
3rdparty/protobuf/src/google/protobuf/util/internal/type_info.cc
View file @
b76a691b
...
...
@@ -60,7 +60,7 @@ class TypeInfoForTypeResolver : public TypeInfo {
virtual
util
::
StatusOr
<
const
google
::
protobuf
::
Type
*>
ResolveTypeUrl
(
StringPiece
type_url
)
const
{
map
<
StringPiece
,
StatusOrType
>::
iterator
it
=
cached_types_
.
find
(
type_url
);
std
::
map
<
StringPiece
,
StatusOrType
>::
iterator
it
=
cached_types_
.
find
(
type_url
);
if
(
it
!=
cached_types_
.
end
())
{
return
it
->
second
;
}
...
...
@@ -85,7 +85,7 @@ class TypeInfoForTypeResolver : public TypeInfo {
virtual
const
google
::
protobuf
::
Enum
*
GetEnumByTypeUrl
(
StringPiece
type_url
)
const
{
map
<
StringPiece
,
StatusOrEnum
>::
iterator
it
=
cached_enums_
.
find
(
type_url
);
std
::
map
<
StringPiece
,
StatusOrEnum
>::
iterator
it
=
cached_enums_
.
find
(
type_url
);
if
(
it
!=
cached_enums_
.
end
())
{
return
it
->
second
.
ok
()
?
it
->
second
.
ValueOrDie
()
:
NULL
;
}
...
...
@@ -123,8 +123,8 @@ class TypeInfoForTypeResolver : public TypeInfo {
typedef
util
::
StatusOr
<
const
google
::
protobuf
::
Enum
*>
StatusOrEnum
;
template
<
typename
T
>
static
void
DeleteCachedTypes
(
map
<
StringPiece
,
T
>*
cached_types
)
{
for
(
typename
map
<
StringPiece
,
T
>::
iterator
it
=
cached_types
->
begin
();
static
void
DeleteCachedTypes
(
std
::
map
<
StringPiece
,
T
>*
cached_types
)
{
for
(
typename
std
::
map
<
StringPiece
,
T
>::
iterator
it
=
cached_types
->
begin
();
it
!=
cached_types
->
end
();
++
it
)
{
if
(
it
->
second
.
ok
())
{
delete
it
->
second
.
ValueOrDie
();
...
...
@@ -153,11 +153,11 @@ class TypeInfoForTypeResolver : public TypeInfo {
// cached_types_, cached_enums_ and camel_case_name_table_.
mutable
set
<
string
>
string_storage_
;
mutable
map
<
StringPiece
,
StatusOrType
>
cached_types_
;
mutable
map
<
StringPiece
,
StatusOrEnum
>
cached_enums_
;
mutable
std
::
map
<
StringPiece
,
StatusOrType
>
cached_types_
;
mutable
std
::
map
<
StringPiece
,
StatusOrEnum
>
cached_enums_
;
mutable
set
<
const
google
::
protobuf
::
Type
*>
indexed_types_
;
mutable
map
<
StringPiece
,
StringPiece
>
camel_case_name_table_
;
mutable
std
::
map
<
StringPiece
,
StringPiece
>
camel_case_name_table_
;
};
}
// namespace
...
...
3rdparty/protobuf/src/google/protobuf/util/message_differencer.cc
View file @
b76a691b
...
...
@@ -1284,7 +1284,7 @@ class MaximumMatcher {
int
count1_
;
int
count2_
;
google
::
protobuf
::
scoped_ptr
<
NodeMatchCallback
>
match_callback_
;
map
<
pair
<
int
,
int
>
,
bool
>
cached_match_results_
;
std
::
map
<
pair
<
int
,
int
>
,
bool
>
cached_match_results_
;
vector
<
int
>*
match_list1_
;
vector
<
int
>*
match_list2_
;
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
(
MaximumMatcher
);
...
...
@@ -1322,7 +1322,7 @@ int MaximumMatcher::FindMaximumMatch(bool early_return) {
bool
MaximumMatcher
::
Match
(
int
left
,
int
right
)
{
pair
<
int
,
int
>
p
(
left
,
right
);
map
<
pair
<
int
,
int
>
,
bool
>::
iterator
it
=
cached_match_results_
.
find
(
p
);
std
::
map
<
pair
<
int
,
int
>
,
bool
>::
iterator
it
=
cached_match_results_
.
find
(
p
);
if
(
it
!=
cached_match_results_
.
end
())
{
return
it
->
second
;
}
...
...
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