@@ -72,7 +72,7 @@ using namespace IfcParse;
7272using namespace IfcWrite ;
7373
7474IfcCharacterDecoder::IfcCharacterDecoder (IfcParse::IfcSpfStream* f) {
75- file = f;
75+ stream_ = f;
7676 codepage_ = 0 ;
7777}
7878
@@ -241,18 +241,18 @@ class pure_impure_helper {
241241} // namespace
242242
243243IfcCharacterDecoder::operator std::string () {
244- return pure_impure_helper (file ).get (mode, substitution_character);
244+ return pure_impure_helper (stream_ ).get (mode, substitution_character);
245245}
246246
247247std::string IfcCharacterDecoder::get (unsigned int & ptr) {
248- return pure_impure_helper (file , ptr).get (mode, substitution_character);
248+ return pure_impure_helper (stream_ , ptr).get (mode, substitution_character);
249249}
250250
251251void IfcCharacterDecoder::skip () {
252252 unsigned int parse_state = 0 ;
253253 char current_char;
254254 unsigned int hex_count = 0 ;
255- while ((current_char = file ->Peek ()) != 0 ) {
255+ while ((current_char = stream_ ->Peek ()) != 0 ) {
256256 if (EXPECTS_CHARACTER (parse_state)) {
257257 parse_state = 0 ;
258258 } else if (current_char == ' \' ' && (parse_state == 0U )) {
@@ -307,19 +307,19 @@ void IfcCharacterDecoder::skip() {
307307 if (parse_state == APOSTROPHE && current_char != ' \' ' ) {
308308 break ;
309309 }
310- throw IfcInvalidTokenException (file ->Tell (), current_char);
310+ throw IfcInvalidTokenException (stream_ ->Tell (), current_char);
311311 } else {
312312 parse_state = hex_count = 0 ;
313313 }
314- file ->Inc ();
314+ stream_ ->Inc ();
315315 }
316316}
317317
318318IfcCharacterDecoder::ConversionMode IfcCharacterDecoder::mode = IfcCharacterDecoder::UTF8;
319319char IfcCharacterDecoder::substitution_character = ' _' ;
320320
321321IfcCharacterEncoder::IfcCharacterEncoder (const std::string& input)
322- : str (IfcUtil::convert_utf8_to_utf32(input)) {}
322+ : str_ (IfcUtil::convert_utf8_to_utf32(input)) {}
323323
324324IfcCharacterEncoder::operator std::string () {
325325 std::ostringstream oss;
@@ -328,12 +328,12 @@ IfcCharacterEncoder::operator std::string() {
328328 // Either 2 or 4 to uses \X2 or \X4 respectively.
329329 // Currently hardcoded to 4, but \X2 might be
330330 // sufficient for nearly all purposes.
331- const int num_bytes = (str .empty () || (*std::max_element (str .begin (), str .end ()) > 0xffff )) ? 4 : 2 ;
331+ const int num_bytes = (str_ .empty () || (*std::max_element (str_ .begin (), str_ .end ()) > 0xffff )) ? 4 : 2 ;
332332 const std::string num_bytes_str = std::string (1 , num_bytes + 0x30 );
333333
334334 bool in_extended = false ;
335335
336- for (auto it = str .begin (); it != str .end (); ++it) {
336+ for (auto it = str_ .begin (); it != str_ .end (); ++it) {
337337 auto ch = *it;
338338 const bool within_spf_range = ch >= 0x20 && ch <= 0x7e ;
339339 if (in_extended && within_spf_range) {
0 commit comments