checkpointing: another small overload fix
On Nate's advice, overload 'char' as well as 'signed char' and 'unsigned char'.
This commit is contained in:
parent
387cbffb7a
commit
26f5a9c2cb
|
@ -334,6 +334,7 @@ STN(unsigned short);
|
||||||
STN(signed short);
|
STN(signed short);
|
||||||
STN(unsigned char);
|
STN(unsigned char);
|
||||||
STN(signed char);
|
STN(signed char);
|
||||||
|
STN(char);
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
bool to_number<bool>(const string &value, bool &retval)
|
bool to_number<bool>(const string &value, bool &retval)
|
||||||
|
|
|
@ -85,6 +85,14 @@ showParam(ostream &os, const T &value)
|
||||||
//
|
//
|
||||||
|
|
||||||
// Treat 8-bit ints (chars) as ints on output, not as chars
|
// Treat 8-bit ints (chars) as ints on output, not as chars
|
||||||
|
template <>
|
||||||
|
void
|
||||||
|
showParam(ostream &os, const char &value)
|
||||||
|
{
|
||||||
|
os << (int)value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void
|
void
|
||||||
showParam(ostream &os, const signed char &value)
|
showParam(ostream &os, const signed char &value)
|
||||||
|
@ -350,6 +358,7 @@ template void \
|
||||||
arrayParamIn(Checkpoint *cp, const string §ion, \
|
arrayParamIn(Checkpoint *cp, const string §ion, \
|
||||||
const string &name, vector<type> ¶m);
|
const string &name, vector<type> ¶m);
|
||||||
|
|
||||||
|
INSTANTIATE_PARAM_TEMPLATES(char)
|
||||||
INSTANTIATE_PARAM_TEMPLATES(signed char)
|
INSTANTIATE_PARAM_TEMPLATES(signed char)
|
||||||
INSTANTIATE_PARAM_TEMPLATES(unsigned char)
|
INSTANTIATE_PARAM_TEMPLATES(unsigned char)
|
||||||
INSTANTIATE_PARAM_TEMPLATES(signed short)
|
INSTANTIATE_PARAM_TEMPLATES(signed short)
|
||||||
|
|
Loading…
Reference in a new issue