64bit patch. Thanks to Zak Kipling
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@403 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
09237ca760
commit
085dbece36
1 changed files with 4 additions and 4 deletions
|
@ -12,7 +12,7 @@
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// This file contains definitions for SafePrintf. SafeScanf coming soon (the
|
// This file contains definitions for SafePrintf. SafeScanf coming soon (the
|
||||||
// design is similar).
|
// design is similar).
|
||||||
// See Alexandrescu, Andrei: Type-safe Formatting, C/C++ Users Journal, Jul 2005
|
// See Alexandrescu, Andrei: Type-safe Formatting, C/C++ Users Journal, Aug 2005
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef LOKI_SAFEFORMAT_H_
|
#ifndef LOKI_SAFEFORMAT_H_
|
||||||
|
@ -408,9 +408,9 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParseDecimalUInt(unsigned int& dest) {
|
void ParseDecimalSizeT(size_t& dest) {
|
||||||
if (!std::isdigit(*format_, std::locale())) return;
|
if (!std::isdigit(*format_, std::locale())) return;
|
||||||
unsigned int r = 0;
|
size_t r = 0;
|
||||||
do {
|
do {
|
||||||
// TODO: inefficient - rewrite
|
// TODO: inefficient - rewrite
|
||||||
r *= 10;
|
r *= 10;
|
||||||
|
@ -421,7 +421,7 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReadWidth() {
|
void ReadWidth() {
|
||||||
ParseDecimalUInt(width_);
|
ParseDecimalSizeT(width_);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReadPrecision() {
|
void ReadPrecision() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue