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
2 changed files with 10 additions and 0 deletions
|
@ -334,6 +334,7 @@ STN(unsigned short);
|
|||
STN(signed short);
|
||||
STN(unsigned char);
|
||||
STN(signed char);
|
||||
STN(char);
|
||||
|
||||
template<>
|
||||
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
|
||||
template <>
|
||||
void
|
||||
showParam(ostream &os, const char &value)
|
||||
{
|
||||
os << (int)value;
|
||||
}
|
||||
|
||||
|
||||
template <>
|
||||
void
|
||||
showParam(ostream &os, const signed char &value)
|
||||
|
@ -350,6 +358,7 @@ template void \
|
|||
arrayParamIn(Checkpoint *cp, const string §ion, \
|
||||
const string &name, vector<type> ¶m);
|
||||
|
||||
INSTANTIATE_PARAM_TEMPLATES(char)
|
||||
INSTANTIATE_PARAM_TEMPLATES(signed char)
|
||||
INSTANTIATE_PARAM_TEMPLATES(unsigned char)
|
||||
INSTANTIATE_PARAM_TEMPLATES(signed short)
|
||||
|
|
Loading…
Reference in a new issue