summaryrefslogtreecommitdiff
path: root/boost/log/expressions/formatters/c_decorator.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/log/expressions/formatters/c_decorator.hpp')
-rw-r--r--boost/log/expressions/formatters/c_decorator.hpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/boost/log/expressions/formatters/c_decorator.hpp b/boost/log/expressions/formatters/c_decorator.hpp
index 9c2b62d726..ec3f485405 100644
--- a/boost/log/expressions/formatters/c_decorator.hpp
+++ b/boost/log/expressions/formatters/c_decorator.hpp
@@ -60,7 +60,7 @@ struct c_decorator_traits< char >
template< unsigned int N >
static std::size_t print_escaped(char (&buf)[N], char c)
{
- int n = boost::log::aux::snprintf(buf, N, "\\x%0.2X", static_cast< unsigned int >(static_cast< uint8_t >(c)));
+ int n = boost::log::aux::snprintf(buf, N, "\\x%.2X", static_cast< unsigned int >(static_cast< uint8_t >(c)));
if (n < 0)
{
n = 0;
@@ -98,17 +98,17 @@ struct c_decorator_traits< wchar_t >
unsigned int val;
if (sizeof(wchar_t) == 1)
{
- format = L"\\x%0.2X";
+ format = L"\\x%.2X";
val = static_cast< uint8_t >(c);
}
else if (sizeof(wchar_t) == 2)
{
- format = L"\\x%0.4X";
+ format = L"\\x%.4X";
val = static_cast< uint16_t >(c);
}
else
{
- format = L"\\x%0.8X";
+ format = L"\\x%.8X";
val = static_cast< uint32_t >(c);
}
@@ -148,7 +148,7 @@ struct c_decorator_gen
* can be used to construct the actual decorator. For example:
*
* <code>
- * c_decor[ attr< std::string >("MyAttr") ]
+ * c_decor[ stream << attr< std::string >("MyAttr") ]
* </code>
*
* For wide-character formatting there is the similar \c wc_decor decorator generator object.
@@ -231,7 +231,6 @@ struct c_ascii_decorator_gen
template< typename SubactorT >
BOOST_FORCEINLINE char_decorator_actor< SubactorT, c_ascii_pattern_replacer< char_type > > operator[] (SubactorT const& subactor) const
{
- typedef c_decorator_traits< char_type > traits_type;
typedef c_ascii_pattern_replacer< char_type > replacer_type;
typedef char_decorator_actor< SubactorT, replacer_type > result_type;
typedef typename result_type::terminal_type terminal_type;
@@ -249,7 +248,7 @@ struct c_ascii_decorator_gen
* can be used to construct the actual decorator. For example:
*
* <code>
- * c_ascii_decor[ attr< std::string >("MyAttr") ]
+ * c_ascii_decor[ stream << attr< std::string >("MyAttr") ]
* </code>
*
* For wide-character formatting there is the similar \c wc_ascii_decor decorator generator object.