Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
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
capnproto
Commits
6ad2e914
Commit
6ad2e914
authored
Apr 04, 2015
by
joshuawarner32@gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only return UNKNOWN_CONTAINS_CAPS when everything else is equal
parent
3cf0023c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
any.c++
c++/src/capnp/any.c++
+16
-5
No files found.
c++/src/capnp/any.c++
View file @
6ad2e914
...
...
@@ -105,6 +105,7 @@ StructEqualityResult AnyStruct::Reader::equals(AnyStruct::Reader right) {
size_t
i
=
0
;
auto
eqResult
=
StructEqualityResult
::
EQUAL
;
for
(;
i
<
kj
::
min
(
ptrsL
.
size
(),
ptrsR
.
size
());
i
++
)
{
auto
l
=
ptrsL
[
i
];
auto
r
=
ptrsR
[
i
];
...
...
@@ -114,12 +115,14 @@ StructEqualityResult AnyStruct::Reader::equals(AnyStruct::Reader right) {
case
StructEqualityResult
:
:
NOT_EQUAL
:
return
StructEqualityResult
::
NOT_EQUAL
;
case
StructEqualityResult
:
:
UNKNOWN_CONTAINS_CAPS
:
return
StructEqualityResult
::
UNKNOWN_CONTAINS_CAPS
;
eqResult
=
StructEqualityResult
::
UNKNOWN_CONTAINS_CAPS
;
break
;
default
:
KJ_UNREACHABLE
;
}
}
return
StructEqualityResult
::
EQUAL
;
return
eqResult
;
}
kj
::
StringPtr
KJ_STRINGIFY
(
StructEqualityResult
res
)
{
...
...
@@ -130,6 +133,8 @@ kj::StringPtr KJ_STRINGIFY(StructEqualityResult res) {
return
"EQUAL"
;
case
StructEqualityResult
:
:
UNKNOWN_CONTAINS_CAPS
:
return
"UNKNOWN_CONTAINS_CAPS"
;
default
:
KJ_UNREACHABLE
;
}
}
...
...
@@ -137,6 +142,7 @@ StructEqualityResult AnyList::Reader::equals(AnyList::Reader right) {
if
(
size
()
!=
right
.
size
())
{
return
StructEqualityResult
::
NOT_EQUAL
;
}
auto
eqResult
=
StructEqualityResult
::
EQUAL
;
switch
(
getElementSize
())
{
case
ElementSize
:
:
VOID
:
case
ElementSize
:
:
BIT
:
...
...
@@ -164,11 +170,16 @@ StructEqualityResult AnyList::Reader::equals(AnyList::Reader right) {
case
StructEqualityResult
:
:
NOT_EQUAL
:
return
StructEqualityResult
::
NOT_EQUAL
;
case
StructEqualityResult
:
:
UNKNOWN_CONTAINS_CAPS
:
return
StructEqualityResult
::
UNKNOWN_CONTAINS_CAPS
;
eqResult
=
StructEqualityResult
::
UNKNOWN_CONTAINS_CAPS
;
break
;
default
:
KJ_UNREACHABLE
;
}
}
return
StructEqualityResult
::
EQUAL
;
return
eqResult
;
}
default
:
KJ_UNREACHABLE
;
}
}
...
...
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