Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
e4543dee
Commit
e4543dee
authored
Jun 07, 2011
by
Ocean Wang
Browse files
[trac838] Add more comments to skipSpaces() function and fix style problems.
parent
c4412dfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/util/encode/base_n.cc
View file @
e4543dee
...
...
@@ -174,11 +174,15 @@ public:
return
(
*
this
);
}
void
skipSpaces
()
{
// If *base_ < 0, on Windows platform with Visual Studio compiler
// it may trigger _ASSERTE((unsigned)(c + 1) <= 256);
// so make sure that the parameter of isspace() is larger than 0
while
(
base_
!=
base_end_
&&
((
*
base_
)
>=
0
)
&&
isspace
(
*
base_
))
{
// If (char is signed and) *base_ < 0, on Windows platform with Visual
// Studio compiler it may trigger _ASSERTE((unsigned)(c + 1) <= 256);
// so make sure that the parameter of isspace() is larger than 0.
// We don't simply cast it to unsigned char to avoid confusing the
// isspace() implementation with a possible extension for values
// larger than 127. Also note the check is not ">= 0"; for systems
// where char is unsigned that would always be true and would possibly
// trigger a compiler warning that could stop the build.
while
(
base_
!=
base_end_
&&
*
base_
>
0
&&
isspace
(
*
base_
))
{
++
base_
;
}
}
...
...
Write
Preview
Supports
Markdown
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