Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
yaml-cpp
Commits
9b78bd45
Commit
9b78bd45
authored
Jul 26, 2009
by
Jesse Beder
Browse files
Fixed hex output in emitter (should be always two hex chars)
parent
c225a553
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/emitterutils.cpp
src/emitterutils.cpp
+3
-2
No files found.
src/emitterutils.cpp
View file @
9b78bd45
...
@@ -2,8 +2,9 @@
...
@@ -2,8 +2,9 @@
#include "exp.h"
#include "exp.h"
#include "indentation.h"
#include "indentation.h"
#include "exceptions.h"
#include "exceptions.h"
#include <sstream>
#include "stringsource.h"
#include "stringsource.h"
#include <sstream>
#include <iomanip>
namespace
YAML
namespace
YAML
{
{
...
@@ -82,7 +83,7 @@ namespace YAML
...
@@ -82,7 +83,7 @@ namespace YAML
}
else
{
}
else
{
// TODO: for the common escaped characters, give their usual symbol
// TODO: for the common escaped characters, give their usual symbol
std
::
stringstream
str
;
std
::
stringstream
str
;
str
<<
"
\\
x"
<<
std
::
hex
<<
static_cast
<
int
>
(
ch
);
str
<<
"
\\
x"
<<
std
::
hex
<<
std
::
setfill
(
'0'
)
<<
std
::
setw
(
2
)
<<
static_cast
<
int
>
(
ch
);
out
<<
str
.
str
();
out
<<
str
.
str
();
}
}
}
}
...
...
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