Skip to content

Commit b0db9ff

Browse files
author
thirdwing
committed
indention
1 parent 5d04d4f commit b0db9ff

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

inst/include/Rcpp/String.h

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -360,37 +360,37 @@ namespace Rcpp {
360360
}
361361

362362
inline const char* get_encoding() const {
363-
switch (enc) {
364-
case CE_BYTES:
365-
return "bytes";
366-
case CE_LATIN1:
367-
return "latin1";
368-
case CE_UTF8:
369-
return "UTF-8";
370-
default:
371-
return "unknown";
372-
}
373-
}
363+
switch (enc) {
364+
case CE_BYTES:
365+
return "bytes";
366+
case CE_LATIN1:
367+
return "latin1";
368+
case CE_UTF8:
369+
return "UTF-8";
370+
default:
371+
return "unknown";
372+
}
373+
}
374374

375-
inline void set_encoding( cetype_t encoding ) {
376-
enc = encoding;
377-
if (data != NULL)
378-
data = Rf_mkCharCE(Rf_translateCharUTF8(data), enc);
379-
}
375+
inline void set_encoding( cetype_t encoding ) {
376+
enc = encoding;
377+
if (data != NULL)
378+
data = Rf_mkCharCE(Rf_translateCharUTF8(data), enc);
379+
}
380380

381381
inline void set_encoding(const char* encoding) {
382-
if ( encoding == "bytes" ) {
383-
enc = CE_BYTES;
384-
} else if ( encoding == "latin1" ) {
385-
enc = CE_LATIN1;
386-
} else if ( encoding == "UTF-8" ) {
387-
enc = CE_UTF8;
388-
} else {
389-
enc = CE_ANY;
390-
Rcout << "Unknown encoding" << std::endl;
391-
}
382+
if ( encoding == "bytes" ) {
383+
enc = CE_BYTES;
384+
} else if ( encoding == "latin1" ) {
385+
enc = CE_LATIN1;
386+
} else if ( encoding == "UTF-8" ) {
387+
enc = CE_UTF8;
388+
} else {
389+
enc = CE_ANY;
390+
Rcout << "Unknown encoding" << std::endl;
391+
}
392392
set_encoding(enc);
393-
}
393+
}
394394

395395
bool operator<( const Rcpp::String& other ) const {
396396
return strcmp( get_cstring(), other.get_cstring() ) < 0;

0 commit comments

Comments
 (0)