summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2013-03-03 16:35:20 +0000
committerrandomdan <randomdan@localhost>2013-03-03 16:35:20 +0000
commitbee88362aeb33e39a03cab30cf26dff2cf8d7ebc (patch)
tree55ecc3520e2bb51daf81f4b71ef3fe271e85a984
parentMove text reader into it's own class (diff)
downloadproject2-bee88362aeb33e39a03cab30cf26dff2cf8d7ebc.tar.bz2
project2-bee88362aeb33e39a03cab30cf26dff2cf8d7ebc.tar.xz
project2-bee88362aeb33e39a03cab30cf26dff2cf8d7ebc.zip
Minor fixes to work with GCC 4.7
-rw-r--r--project2/cgi/cgiStagePresent.cpp2
-rw-r--r--project2/common/fileStrmVarWriter.cpp2
-rw-r--r--project2/common/options.h3
-rw-r--r--project2/common/scriptLoader.cpp2
4 files changed, 6 insertions, 3 deletions
diff --git a/project2/cgi/cgiStagePresent.cpp b/project2/cgi/cgiStagePresent.cpp
index c66f409..90299fe 100644
--- a/project2/cgi/cgiStagePresent.cpp
+++ b/project2/cgi/cgiStagePresent.cpp
@@ -11,7 +11,7 @@ CgiApplicationEngine::PresentStage::PresentStage(ScriptReaderPtr s) :
CommonObjects(s->root()),
CheckHost(s->root()),
ViewHost(s->root()),
- presenter([root,this] {
+ presenter([this] {
auto p = PresenterLoader::getFor(this->env()->defaultPresenter)->create(root, Default);
auto xp = dynamic_cast<TransformSource *>(p);
auto cp = dynamic_cast<ContentPresenter *>(p);
diff --git a/project2/common/fileStrmVarWriter.cpp b/project2/common/fileStrmVarWriter.cpp
index 47d03e8..caaf908 100644
--- a/project2/common/fileStrmVarWriter.cpp
+++ b/project2/common/fileStrmVarWriter.cpp
@@ -26,7 +26,7 @@ void FileStreamVariableWriter::operator()(const Boolean & i) const {
fprintf(out, i.value ? "true" : "false");
}
void FileStreamVariableWriter::operator()(const int64_t & i) const {
- fprintf(out, "%"PRId64, i);
+ fprintf(out, "%" PRId64, i);
}
void FileStreamVariableWriter::operator()(const double & i) const {
fprintf(out, "%g", i);
diff --git a/project2/common/options.h b/project2/common/options.h
index d4cd891..62a38fb 100644
--- a/project2/common/options.h
+++ b/project2/common/options.h
@@ -8,6 +8,8 @@
#include <boost/lexical_cast.hpp>
#include <boost/utility/enable_if.hpp>
+#if !__GNUC_PREREQ(4,7)
+// If gcc_version >= 4.0
namespace std {
//
// Should be part of the standard headers, but seems to be missing
@@ -28,6 +30,7 @@ namespace std {
struct is_assignable : public integral_constant<bool, __is_assignable_helper<_Tp, _Up>::value>
{ };
}
+#endif
class Options {
public:
diff --git a/project2/common/scriptLoader.cpp b/project2/common/scriptLoader.cpp
index 7f02f9b..bd6495b 100644
--- a/project2/common/scriptLoader.cpp
+++ b/project2/common/scriptLoader.cpp
@@ -133,7 +133,7 @@ LoaderBase::collectAll(const CommonObjects * co, bool childrenOnly, ScriptNodePt
throw std::logic_error("Cannot set CommonObjects in subloader");
}
Targets::iterator i;
- ScopeObject clr(NULL, NULL, [&loadedObjects] { loadedObjects.clear(); });
+ ScopeObject clr(NULL, NULL, [] { loadedObjects.clear(); });
while ((i = targets.begin()) != targets.end()) {
collectAll(i->first, childrenOnly, i->second);
targets.erase(i);