fix 64bit pointer problem, and remove a msvc warning

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@385 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
syntheticpp 2005-12-27 18:19:23 +00:00
parent 4bdb1d4532
commit 30dadd86ed

View file

@ -152,7 +152,7 @@ struct PrintfState {
ReadLeaders(); ReadLeaders();
const char fmt = *format_; const char fmt = *format_;
if (fmt == 'p') { if (fmt == 'p') {
FormatWithCurrentFlags(reinterpret_cast<unsigned long>(s)); FormatWithCurrentFlags(reinterpret_cast<uintptr_t>(s));
return *this; return *this;
} }
if (fmt != 's') { if (fmt != 's') {
@ -176,7 +176,7 @@ struct PrintfState {
} }
PrintfState& operator()(const void *const p) { PrintfState& operator()(const void *const p) {
return (*this)(reinterpret_cast<unsigned long>(p)); return (*this)(reinterpret_cast<uintptr_t>(p));
} }
// read the result // read the result
@ -185,6 +185,7 @@ struct PrintfState {
} }
private: private:
PrintfState& operator=(const PrintfState&);
template <typename T> template <typename T>
PrintfState& StoreCountHelper(T *const pi) { PrintfState& StoreCountHelper(T *const pi) {
if (result_ == -1) return *this; // don't even bother if (result_ == -1) return *this; // don't even bother