X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=libs%2Fstringio.h;h=85d598f34f4e85da28b6a1670c080ff15cd0e66e;hb=refs%2Fheads%2FMelanosuchus%2Fcmake;hp=ff1a3a67a1300f58ff4b7cefdd7dc01c26b069e2;hpb=3c73487420fde8d4a3b5360d8b99e48132517900;p=xonotic%2Fnetradiant.git diff --git a/libs/stringio.h b/libs/stringio.h index ff1a3a67..85d598f3 100644 --- a/libs/stringio.h +++ b/libs/stringio.h @@ -22,7 +22,7 @@ #if !defined ( INCLUDED_STRINGIO_H ) #define INCLUDED_STRINGIO_H -#include +#include #include #include "generic/vector.h" @@ -219,7 +219,7 @@ inline bool string_parse_size( const char* string, std::size_t& i ){ } -#define RETURN_FALSE_IF_FAIL( expression ) if ( !expression ) {return false; }else +#define RETURN_FALSE_IF_FAIL( expression ) if ( !expression ) {return false; } inline void Tokeniser_unexpectedError( Tokeniser& tokeniser, const char* token, const char* expected ){ globalErrorStream() << Unsigned( tokeniser.getLine() ) << ":" << Unsigned( tokeniser.getColumn() ) << ": parse error at '" << ( token != 0 ? token : "#EOF" ) << "': expected '" << expected << "'\n"; @@ -289,14 +289,14 @@ inline TextOutputStreamType& ostream_write( TextOutputStreamType& outputStream, -inline void CopiedString_importString( CopiedString& self, const char* string ){ +inline void CopiedString_importString( std::string& self, const char* string ){ self = string; } -typedef ReferenceCaller1 CopiedStringImportStringCaller; -inline void CopiedString_exportString( const CopiedString& self, const StringImportCallback& importer ){ +typedef ReferenceCaller1 CopiedStringImportStringCaller; +inline void CopiedString_exportString( const std::string& self, const StringImportCallback& importer ){ importer( self.c_str() ); } -typedef ConstReferenceCaller1 CopiedStringExportStringCaller; +typedef ConstReferenceCaller1 CopiedStringExportStringCaller; inline void Bool_importString( bool& self, const char* string ){ self = string_equal( string, "true" );