Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Sebastian Schrader
Kea
Commits
a536d9ce
Commit
a536d9ce
authored
Dec 22, 2016
by
Tomek Mrugalski
🛰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[5039] getNonConst method is now const.
parent
81f4dc50
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/lib/cc/data.cc
src/lib/cc/data.cc
+1
-1
src/lib/cc/data.h
src/lib/cc/data.h
+2
-2
No files found.
src/lib/cc/data.cc
View file @
a536d9ce
...
...
@@ -131,7 +131,7 @@ Element::get(const int) const {
}
ElementPtr
Element
::
getNonConst
(
const
int
)
{
Element
::
getNonConst
(
const
int
)
const
{
throwTypeError
(
"get(int) called on a non-list Element"
);
}
...
...
src/lib/cc/data.h
View file @
a536d9ce
...
...
@@ -281,7 +281,7 @@ public:
///
/// \param i The position of the ElementPtr to retrieve
/// \return specified element pointer
virtual
ElementPtr
getNonConst
(
const
int
i
);
virtual
ElementPtr
getNonConst
(
const
int
i
)
const
;
/// Sets the ElementPtr at the given index. If the index is out
/// of bounds, this function throws an std::out_of_range exception.
...
...
@@ -633,7 +633,7 @@ public:
}
using
Element
::
get
;
ConstElementPtr
get
(
int
i
)
const
{
return
(
l
.
at
(
i
));
}
ElementPtr
getNonConst
(
int
i
)
{
return
(
l
.
at
(
i
));
}
ElementPtr
getNonConst
(
int
i
)
const
{
return
(
l
.
at
(
i
));
}
using
Element
::
set
;
void
set
(
size_t
i
,
ElementPtr
e
)
{
l
.
at
(
i
)
=
e
;
...
...
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