Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adam Osuchowski
Kea
Commits
8ad7de96
Commit
8ad7de96
authored
Dec 10, 2012
by
Marcin Siodelski
Browse files
[2491] Use .empty() function to check if container is empty.
parent
eb5b276d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lib/dhcp/option_data_types.cc
View file @
8ad7de96
...
...
@@ -248,7 +248,7 @@ OptionDataTypeUtil::writeFqdn(const std::string& fqdn,
std
::
string
OptionDataTypeUtil
::
readString
(
const
std
::
vector
<
uint8_t
>&
buf
)
{
std
::
string
value
;
if
(
buf
.
size
()
>
0
)
{
if
(
!
buf
.
empty
()
)
{
value
.
insert
(
value
.
end
(),
buf
.
begin
(),
buf
.
end
());
}
return
(
value
);
...
...
src/lib/dhcp/option_definition.cc
View file @
8ad7de96
...
...
@@ -173,7 +173,7 @@ OptionDefinition::optionFactory(Option::Universe u, uint16_t type,
OptionBuffer
buf
;
if
(
!
array_type_
&&
type_
!=
OPT_RECORD_TYPE
)
{
if
(
values
.
size
()
==
0
)
{
if
(
values
.
empty
()
)
{
isc_throw
(
InvalidOptionValue
,
"no option value specified"
);
}
writeToBuffer
(
values
[
0
],
type_
,
buf
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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