@@ -79,7 +79,7 @@ void DcmJsonFormat::normalizeDecimalString(OFString &value)
7979 // These are permitted in DICOM but not in JSON.
8080 size_t pos;
8181 while (OFString_npos != (pos = value.find (' +' )))
82- value.erase (pos,1 );
82+ value.erase (pos,1 );
8383
8484 // check if the first character is a minus sign.
8585 // if so, remove it and set "minus" to true
@@ -114,18 +114,17 @@ void DcmJsonFormat::normalizeDecimalString(OFString &value)
114114 // with a period
115115 if (OFString_npos != (pos = value.find (' .' )))
116116 {
117- if (pos == value.length () -1 )
118- {
119- // number ends with a period. Add a zero
120- value.append (" 0" );
121- }
122- else if ((value[pos+1 ] < ' 0' ) || (value[pos+1 ] > ' 9' ))
123- {
124- // no digit after period. Insert a zero
125- value.insert (pos+1 , " 0" );
126- }
117+ if (pos == value.length () -1 )
118+ {
119+ // number ends with a period. Add a zero
120+ value.append (" 0" );
121+ }
122+ else if ((value[pos+1 ] < ' 0' ) || (value[pos+1 ] > ' 9' ))
123+ {
124+ // no digit after period. Insert a zero
125+ value.insert (pos+1 , " 0" );
126+ }
127127 }
128-
129128}
130129
131130// Formats the number to JSON standard as IntegerString
@@ -135,7 +134,7 @@ void DcmJsonFormat::normalizeIntegerString(OFString &value)
135134 // These are permitted in DICOM but not in JSON.
136135 size_t pos;
137136 while (OFString_npos != (pos = value.find (' +' )))
138- value.erase (pos,1 );
137+ value.erase (pos,1 );
139138
140139 OFBool minus = OFFalse;
141140
@@ -255,7 +254,6 @@ DcmJsonFormatPretty::DcmJsonFormatPretty(const OFBool printMetaInfo)
255254: DcmJsonFormat(printMetaInfo)
256255, m_IndentionLevel(0 )
257256{
258-
259257}
260258
261259void DcmJsonFormatPretty::printIndention (STD_NAMESPACE ostream& out)
@@ -290,17 +288,19 @@ OFString DcmJsonFormatPretty::space()
290288DcmJsonFormatCompact::DcmJsonFormatCompact (const OFBool printMetaInfo)
291289: DcmJsonFormat(printMetaInfo)
292290{
293-
294291}
295292
296293void DcmJsonFormatCompact::printIndention (STD_NAMESPACE ostream& /* out*/ )
297- {}
294+ {
295+ }
298296
299297void DcmJsonFormatCompact::increaseIndention ()
300- {}
298+ {
299+ }
301300
302301void DcmJsonFormatCompact::decreaseIndention ()
303- {}
302+ {
303+ }
304304
305305OFString DcmJsonFormatCompact::newline ()
306306{
0 commit comments