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
960fb926
Commit
960fb926
authored
Aug 15, 2018
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Map::size() and Map::capacity() should be const.
parent
82e680f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
map.h
c++/src/kj/map.h
+8
-8
No files found.
c++/src/kj/map.h
View file @
960fb926
...
...
@@ -44,8 +44,8 @@ public:
void
reserve
(
size_t
size
);
// Pre-allocates space for a map of the given size.
size_t
size
();
size_t
capacity
();
size_t
size
()
const
;
size_t
capacity
()
const
;
void
clear
();
struct
Entry
{
...
...
@@ -136,8 +136,8 @@ public:
void
reserve
(
size_t
size
);
// Pre-allocates space for a map of the given size.
size_t
size
();
size_t
capacity
();
size_t
size
()
const
;
size_t
capacity
()
const
;
void
clear
();
struct
Entry
{
...
...
@@ -281,11 +281,11 @@ void HashMap<Key, Value>::reserve(size_t size) {
}
template
<
typename
Key
,
typename
Value
>
size_t
HashMap
<
Key
,
Value
>::
size
()
{
size_t
HashMap
<
Key
,
Value
>::
size
()
const
{
return
table
.
size
();
}
template
<
typename
Key
,
typename
Value
>
size_t
HashMap
<
Key
,
Value
>::
capacity
()
{
size_t
HashMap
<
Key
,
Value
>::
capacity
()
const
{
return
table
.
capacity
();
}
template
<
typename
Key
,
typename
Value
>
...
...
@@ -373,11 +373,11 @@ void TreeMap<Key, Value>::reserve(size_t size) {
}
template
<
typename
Key
,
typename
Value
>
size_t
TreeMap
<
Key
,
Value
>::
size
()
{
size_t
TreeMap
<
Key
,
Value
>::
size
()
const
{
return
table
.
size
();
}
template
<
typename
Key
,
typename
Value
>
size_t
TreeMap
<
Key
,
Value
>::
capacity
()
{
size_t
TreeMap
<
Key
,
Value
>::
capacity
()
const
{
return
table
.
capacity
();
}
template
<
typename
Key
,
typename
Value
>
...
...
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