# HG changeset patch # User Teemu Piippo # Date 1376179370 -10800 # Node ID 3ddebf76105efdc6b040e316c4000d6caca0fd19 # Parent bc1414343e19662ff09c7c1c4cd9fe2c417d4404 made style more consistent diff -r bc1414343e19 -r 3ddebf76105e src/demo.cpp --- a/src/demo.cpp Sun Aug 11 02:58:55 2013 +0300 +++ b/src/demo.cpp Sun Aug 11 03:02:50 2013 +0300 @@ -206,15 +206,15 @@ return 6; } } - + QSettings cfg; str binarypath = cfg.value (binaryConfigName (zanversion)).toString(); - + if (binarypath.isEmpty()) { error (fmt (tr ("No binary path specified for Zandronum version %1!"), zanversion)); return 7; } - + str iwadpath; list pwadpaths; diff -r bc1414343e19 -r 3ddebf76105e src/main.cpp --- a/src/main.cpp Sun Aug 11 02:58:55 2013 +0300 +++ b/src/main.cpp Sun Aug 11 03:02:50 2013 +0300 @@ -6,36 +6,36 @@ // ============================================================================= // ----------------------------------------------------------------------------- -int main( int argc, char* argv[] ) { - QApplication app( argc, argv ); - app.setApplicationName( UNIXNAME ); - app.setOrganizationName( UNIXNAME ); - app.setApplicationVersion( versionString() ); +int main (int argc, char* argv[]) { + QApplication app (argc, argv); + app.setApplicationName (UNIXNAME); + app.setOrganizationName (UNIXNAME); + app.setApplicationVersion (versionString()); - for( int i = 1; i < argc; ++i ) { + for (int i = 1; i < argc; ++i) { str arg = argv[i]; - if( arg == "--config" ) { + if (arg == "--config") { ConfigBox dlg; return dlg.exec(); } } - if( argc != 2 ) { - fprint( stderr, "Usage: %1 - Launch a demo file\n", argv[0] ); - fprint( stderr, " %1 --config - Configure " APPNAME "\n", argv[0] ); + if (argc != 2) { + fprint (stderr, "Usage: %1 - Launch a demo file\n", argv[0]); + fprint (stderr, " %1 --config - Configure " APPNAME "\n", argv[0]); return 255; } - return launchDemo( argv[1] ); + return launchDemo (argv[1]); } // ============================================================================= // ----------------------------------------------------------------------------- str versionString() { - str text = fmt( "v%1.%2", VERSION_MAJOR, VERSION_MINOR ); + str text = fmt ("v%1.%2", VERSION_MAJOR, VERSION_MINOR); #if VERSION_PATCH != 0 - text += fmt( ".%1", VERSION_PATCH ); + text += fmt (".%1", VERSION_PATCH); #endif #if BUILD_ID == BUILD_INTERNAL @@ -45,7 +45,7 @@ #elif BUILD_ID == BUILD_BETA text += "-beta"; #elif BUILD_ID == BUILD_RC - text += fmt( "-rc%1", RC_ID ); + text += fmt ("-rc%1", RC_ID); #elif BUILD_ID == BUILD_RELEASE text += "-rel"; #else @@ -53,4 +53,4 @@ #endif // BUILD_ID return text; -} \ No newline at end of file +} diff -r bc1414343e19 -r 3ddebf76105e src/types.cpp --- a/src/types.cpp Sun Aug 11 02:58:55 2013 +0300 +++ b/src/types.cpp Sun Aug 11 03:02:50 2013 +0300 @@ -4,26 +4,26 @@ #include #include "types.h" -str doFormat( initlist args ) { - assert( args.size() >= 1 ); +str doFormat (initlist args) { + assert (args.size() >= 1); str text = args.begin()->value(); - for( initlist::iterator it = args.begin() + 1; it != args.end(); ++it ) - text = text.arg( it->value() ); + for (initlist::iterator it = args.begin() + 1; it != args.end(); ++it) + text = text.arg (it->value()); return text; } -void doPrint( FILE* fp, initlist args ) { - fprintf( fp, "%s", doFormat( args ).toStdString().c_str() ); +void doPrint (FILE* fp, initlist args) { + fprintf (fp, "%s", doFormat (args).toStdString().c_str()); } // ============================================================================= -StringFormatArg::StringFormatArg( const str& v ) { m_val = v; } -StringFormatArg::StringFormatArg( const char& v ) { m_val = v; } -StringFormatArg::StringFormatArg( const uchar& v ) { m_val = v; } -StringFormatArg::StringFormatArg( const qchar& v ) { m_val = v; } -StringFormatArg::StringFormatArg( const float& v ) { m_val = str::number( v ); } -StringFormatArg::StringFormatArg( const double& v ) { m_val = str::number( v ); } -StringFormatArg::StringFormatArg( const char* v ) { m_val = v; } -StringFormatArg::StringFormatArg( const void* v ) { m_val.sprintf( "%p", v ); } \ No newline at end of file +StringFormatArg::StringFormatArg (const str& v) { m_val = v; } +StringFormatArg::StringFormatArg (const char& v) { m_val = v; } +StringFormatArg::StringFormatArg (const uchar& v) { m_val = v; } +StringFormatArg::StringFormatArg (const qchar& v) { m_val = v; } +StringFormatArg::StringFormatArg (const float& v) { m_val = str::number (v); } +StringFormatArg::StringFormatArg (const double& v) { m_val = str::number (v); } +StringFormatArg::StringFormatArg (const char* v) { m_val = v; } +StringFormatArg::StringFormatArg (const void* v) { m_val.sprintf ("%p", v); } \ No newline at end of file