From 61e8024c65ed05a101bdf09a4010009cd56ed15e Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Tue, 30 Apr 2013 17:44:25 -0400 Subject: [PATCH] fix mapping between int* and epicsInt* types --- pvDataApp/misc/parseToPOD.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pvDataApp/misc/parseToPOD.cpp b/pvDataApp/misc/parseToPOD.cpp index 6fad99f..e947c69 100644 --- a/pvDataApp/misc/parseToPOD.cpp +++ b/pvDataApp/misc/parseToPOD.cpp @@ -420,20 +420,16 @@ void handleParseError(int err) namespace epics { namespace pvData { namespace detail { -void parseToPOD(const std::string& in, int8 *out) { - epicsInt8 temp; - int err = epicsParseInt8(in.c_str(), &temp, 0, NULL); - if(err) handleParseError(err); - else *out = temp; -} - #define INTFN(T, S) \ void parseToPOD(const std::string& in, T *out) { \ - int err = epicsParse ## S(in.c_str(), out, 0, NULL); \ + epics ## S temp; \ + int err = epicsParse ## S (in.c_str(), &temp, 0, NULL); \ if(err) handleParseError(err); \ + else *out = temp; \ } INTFN(char, Int8); +INTFN(int8_t, Int8); INTFN(uint8_t, UInt8); INTFN(int16_t, Int16); INTFN(uint16_t, UInt16);