File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -43,14 +43,14 @@ const char* FALSE_STR = "false";
4343
4444bool TreeBuilder::Null ()
4545{
46- return this ->String (NULL_STR, sizeof ( NULL_STR), true );
46+ return this ->String (NULL_STR, static_cast <SizeType>( strlen ( NULL_STR) ), true );
4747}
4848
4949bool TreeBuilder::Bool (bool b)
5050{
5151 if (b)
52- return this ->String (TRUE_STR, sizeof ( TRUE_STR), true );
53- return this ->String (FALSE_STR, sizeof ( FALSE_STR), true );
52+ return this ->String (TRUE_STR, static_cast <SizeType>( strlen ( TRUE_STR) ), true );
53+ return this ->String (FALSE_STR, static_cast <SizeType>( strlen ( FALSE_STR) ), true );
5454}
5555
5656bool TreeBuilder::Int (int i) { cout << " Int(" << i << " )" << endl; return true ; }
Original file line number Diff line number Diff line change 33#include < string>
44#include < Shlwapi.h>
55
6- # define SSTR ( x ) static_cast < std::ostringstream & >( \
7- ( std::ostringstream() << std::dec << x ) ) .str()
6+ template < typename T>
7+ constexpr auto SSTR (T x) { return ( std::ostringstream () << std::dec << x) .str (); }
88
99EXTERN_C IMAGE_DOS_HEADER __ImageBase;
1010
You can’t perform that action at this time.
0 commit comments