# HG changeset patch # User Teemu Piippo # Date 1433621853 -10800 # Node ID e121ea9dba9324131452852c26ba0d51bfb17a3d # Parent 4a0ad0a08ea12335e765489f3efb5bf95e5f1207 Now C++03 compatible diff -r 4a0ad0a08ea1 -r e121ea9dba93 CMakeLists.txt --- a/CMakeLists.txt Sat Jun 06 23:13:41 2015 +0300 +++ b/CMakeLists.txt Sat Jun 06 23:17:33 2015 +0300 @@ -51,7 +51,7 @@ set (ZCINEMA_RESOURCES zcinema.qrc) if (NOT MSVC) - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -W -Wall") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wall") endif() include_directories ("${PROJECT_BINARY_DIR}") diff -r 4a0ad0a08ea1 -r e121ea9dba93 commonlib/types.h --- a/commonlib/types.h Sat Jun 06 23:13:41 2015 +0300 +++ b/commonlib/types.h Sat Jun 06 23:17:33 2015 +0300 @@ -21,10 +21,6 @@ #include #include -template using list = QList; -template using initlist = std::initializer_list; -using std::size_t; - typedef qint8 int8; typedef qint16 int16; typedef qint32 int32; diff -r 4a0ad0a08ea1 -r e121ea9dba93 launcher/demo.cpp --- a/launcher/demo.cpp Sat Jun 06 23:13:41 2015 +0300 +++ b/launcher/demo.cpp Sat Jun 06 23:17:33 2015 +0300 @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -37,18 +38,20 @@ QString out; int skip = 0; - for (QChar c : in) + for (int i = 0; i < in.length(); ++i) { if (skip-- > 0) continue; - if (c == QChar ('\034')) + QChar ch = in[i]; + + if (ch == QChar ('\034')) { skip = 1; continue; } - out += c; + out += ch; } return out; @@ -305,8 +308,9 @@ QStringList pwadpaths; // Find the WADs - for (const QString& wad : wads) + for (int i = 0; i < wads.size(); ++i) { + const QString& wad = wads[i]; QString path = findWAD (wad); // WAD names are case-sensitive under non-Windows and they can appear in uppercase @@ -330,15 +334,15 @@ { QString pwadtext; - for (const QString& wad : wads) + for (int i = 0; i < wads.size(); ++i) { - if (&wad == &wads.first()) + if (i == 0) continue; // skip the IWAD if (not pwadtext.isEmpty()) pwadtext += "
"; - pwadtext += wad; + pwadtext += wads[i]; } QDialog* dlg = new QDialog;