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
75de6af7
Commit
75de6af7
authored
Aug 28, 2013
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update some todos
parent
7f17b7bd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
41 deletions
+1
-41
layout.c++
c++/src/capnp/layout.c++
+0
-2
schema-loader-test.c++
c++/src/capnp/schema-loader-test.c++
+0
-2
exception.c++
c++/src/kj/exception.c++
+1
-37
No files found.
c++/src/capnp/layout.c++
View file @
75de6af7
...
...
@@ -187,8 +187,6 @@ struct WirePointer {
KJ_ALWAYS_INLINE
(
bool
isNull
()
const
)
{
// If the upper 32 bits are zero, this is a pointer to an empty struct. We consider that to be
// our "null" value.
// TODO(perf): Maybe this would be faster, but violates aliasing rules; does it matter?:
// return *reinterpret_cast<const uint64_t*>(this) == 0;
return
(
offsetAndKind
.
get
()
==
0
)
&
(
upper32Bits
==
0
);
}
};
...
...
c++/src/capnp/schema-loader-test.c++
View file @
75de6af7
...
...
@@ -241,8 +241,6 @@ TEST(SchemaLoader, Incompatible) {
loadUnderAlternateTypeId
<
test
::
TestAllTypes
>
(
loader
,
typeId
<
test
::
TestListDefaults
>
()));
}
// TODO(test): More extensively test upgrade/downgrade checks.
TEST
(
SchemaLoader
,
Enumerate
)
{
SchemaLoader
loader
;
loader
.
loadCompiledTypeAndDependencies
<
TestAllTypes
>
();
...
...
c++/src/kj/exception.c++
View file @
75de6af7
...
...
@@ -251,42 +251,6 @@ namespace {
thread_local
ExceptionCallback
*
threadLocalCallback
=
nullptr
;
class
RepeatChar
{
// A pseudo-sequence of characters that is actually just one character repeated.
//
// TODO(cleanup): Put this somewhere reusable. Maybe templatize it too.
public
:
inline
RepeatChar
(
char
c
,
uint
size
)
:
c
(
c
),
size_
(
size
)
{}
class
Iterator
{
public
:
Iterator
()
=
default
;
inline
Iterator
(
char
c
,
uint
index
)
:
c
(
c
),
index
(
index
)
{}
inline
Iterator
&
operator
++
()
{
++
index
;
return
*
this
;
}
inline
Iterator
operator
++
(
int
)
{
++
index
;
return
Iterator
(
c
,
index
-
1
);
}
inline
char
operator
*
()
const
{
return
c
;
}
inline
bool
operator
==
(
const
Iterator
&
other
)
const
{
return
index
==
other
.
index
;
}
inline
bool
operator
!=
(
const
Iterator
&
other
)
const
{
return
index
!=
other
.
index
;
}
private
:
char
c
;
uint
index
;
};
inline
uint
size
()
const
{
return
size_
;
}
inline
Iterator
begin
()
const
{
return
Iterator
(
c
,
0
);
}
inline
Iterator
end
()
const
{
return
Iterator
(
c
,
size_
);
}
private
:
char
c
;
uint
size_
;
};
inline
RepeatChar
KJ_STRINGIFY
(
RepeatChar
value
)
{
return
value
;
}
}
// namespace
ExceptionCallback
::
ExceptionCallback
()
:
next
(
getExceptionCallback
())
{
...
...
@@ -344,7 +308,7 @@ public:
}
void
logMessage
(
const
char
*
file
,
int
line
,
int
contextDepth
,
String
&&
text
)
override
{
text
=
str
(
RepeatChar
(
'_'
,
contextDepth
),
file
,
":"
,
line
,
": "
,
mv
(
text
));
text
=
str
(
kj
::
repeat
(
'_'
,
contextDepth
),
file
,
":"
,
line
,
": "
,
mv
(
text
));
StringPtr
textPtr
=
text
;
...
...
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