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
69dea08e
Commit
69dea08e
authored
Apr 11, 2015
by
joshuawarner32@gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correct KJ_UNREACHABLE usage, remove unused PointerType::OTHER enum value
parent
3e966900
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
17 deletions
+8
-17
any.c++
c++/src/capnp/any.c++
+7
-13
common.h
c++/src/capnp/common.h
+1
-4
No files found.
c++/src/capnp/any.c++
View file @
69dea08e
...
...
@@ -133,9 +133,8 @@ kj::StringPtr KJ_STRINGIFY(Equality res) {
return
"EQUAL"
;
case
Equality
:
:
UNKNOWN_CONTAINS_CAPS
:
return
"UNKNOWN_CONTAINS_CAPS"
;
default
:
KJ_UNREACHABLE
;
}
KJ_UNREACHABLE
;
}
Equality
AnyList
::
Reader
::
equals
(
AnyList
::
Reader
right
)
{
...
...
@@ -178,9 +177,8 @@ Equality AnyList::Reader::equals(AnyList::Reader right) {
}
return
eqResult
;
}
default
:
KJ_UNREACHABLE
;
}
KJ_UNREACHABLE
;
}
Equality
AnyPointer
::
Reader
::
equals
(
AnyPointer
::
Reader
right
)
{
...
...
@@ -196,10 +194,9 @@ Equality AnyPointer::Reader::equals(AnyPointer::Reader right) {
return
getAs
<
AnyList
>
().
equals
(
right
.
getAs
<
AnyList
>
());
case
PointerType
:
:
CAPABILITY
:
return
Equality
::
UNKNOWN_CONTAINS_CAPS
;
default
:
// There aren't currently any other types of pointers
KJ_UNREACHABLE
;
}
// There aren't currently any other types of pointers
KJ_UNREACHABLE
;
}
bool
AnyPointer
::
Reader
::
operator
==
(
AnyPointer
::
Reader
right
)
{
...
...
@@ -211,9 +208,8 @@ bool AnyPointer::Reader::operator ==(AnyPointer::Reader right) {
case
Equality
:
:
UNKNOWN_CONTAINS_CAPS
:
KJ_FAIL_REQUIRE
(
"operator== cannot determine equality of capabilities; use equals() instead if you need to handle this case"
);
default
:
KJ_UNREACHABLE
;
}
KJ_UNREACHABLE
;
}
bool
AnyStruct
::
Reader
::
operator
==
(
AnyStruct
::
Reader
right
)
{
...
...
@@ -225,9 +221,8 @@ bool AnyStruct::Reader::operator ==(AnyStruct::Reader right) {
case
Equality
:
:
UNKNOWN_CONTAINS_CAPS
:
KJ_FAIL_REQUIRE
(
"operator== cannot determine equality of capabilities; use equals() instead if you need to handle this case"
);
default
:
KJ_UNREACHABLE
;
}
KJ_UNREACHABLE
;
}
bool
AnyList
::
Reader
::
operator
==
(
AnyList
::
Reader
right
)
{
...
...
@@ -239,9 +234,8 @@ bool AnyList::Reader::operator ==(AnyList::Reader right) {
case
Equality
:
:
UNKNOWN_CONTAINS_CAPS
:
KJ_FAIL_REQUIRE
(
"operator== cannot determine equality of capabilities; use equals() instead if you need to handle this case"
);
default
:
KJ_UNREACHABLE
;
}
KJ_UNREACHABLE
;
}
}
// namespace capnp
c++/src/capnp/common.h
View file @
69dea08e
...
...
@@ -107,10 +107,7 @@ enum class PointerType {
STRUCT
,
LIST
,
CAPABILITY
,
OTHER
// currently unused
CAPABILITY
};
namespace
schemas
{
...
...
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