From 9d30d3323b50f320d098f31a82d7d6dfd541cdf0 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Fri, 3 Mar 2017 10:55:20 -0500 Subject: [PATCH] Update Ghoul repository Adapt to changed signature of ghoul_assert macro --- ext/ghoul | 2 +- include/openspace/documentation/verifier.inl | 1 + modules/globebrowsing/meshes/basicgrid.cpp | 7 +++++-- modules/globebrowsing/tile/tileindex.cpp | 2 ++ .../tile/tileprovider/temporaltileprovider.cpp | 2 +- modules/space/rendering/renderableplanet.cpp | 7 +++++-- src/documentation/documentationengine.cpp | 1 + src/engine/downloadmanager.cpp | 5 ++++- src/rendering/renderable.cpp | 2 +- src/util/factorymanager.cpp | 15 ++++++++------- 10 files changed, 29 insertions(+), 15 deletions(-) diff --git a/ext/ghoul b/ext/ghoul index f7fcee5973..e0cbca16ad 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit f7fcee5973052efc94d499496d472316f56e225a +Subproject commit e0cbca16ad71700cf82d0d24bcf4fc14bded10ea diff --git a/include/openspace/documentation/verifier.inl b/include/openspace/documentation/verifier.inl index 7256f9473a..70751ac380 100644 --- a/include/openspace/documentation/verifier.inl +++ b/include/openspace/documentation/verifier.inl @@ -25,6 +25,7 @@ #include #include +#include namespace std { std::string to_string(std::string value); diff --git a/modules/globebrowsing/meshes/basicgrid.cpp b/modules/globebrowsing/meshes/basicgrid.cpp index 88d33512d6..7bd91dea3d 100644 --- a/modules/globebrowsing/meshes/basicgrid.cpp +++ b/modules/globebrowsing/meshes/basicgrid.cpp @@ -64,8 +64,11 @@ int BasicGrid::ySegments() const { } void BasicGrid::validate(int xSegments, int ySegments) { - ghoul_assert(xSegments > 0 && ySegments > 0, - "Resolution must be at least 1x1. (" << xSegments << ", " << ySegments << ")"); + ghoul_assert( + xSegments > 0 && ySegments > 0, + std::string("Resolution must be at least 1x1. (") + + std::to_string(xSegments) + ", " + std::to_string(ySegments) + ")" + ); } inline size_t BasicGrid::numElements(int xSegments, int ySegments) { diff --git a/modules/globebrowsing/tile/tileindex.cpp b/modules/globebrowsing/tile/tileindex.cpp index 44d0ef8b44..f5ca66ab3a 100644 --- a/modules/globebrowsing/tile/tileindex.cpp +++ b/modules/globebrowsing/tile/tileindex.cpp @@ -28,6 +28,8 @@ #include +#include + namespace { const char* KeyLevel = "Level"; const char* KeyX = "X"; diff --git a/modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp b/modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp index 7e5e213611..8e8024872d 100644 --- a/modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp +++ b/modules/globebrowsing/tile/tileprovider/temporaltileprovider.cpp @@ -287,7 +287,7 @@ TimeFormat* TimeIdProviderFactory::getProvider(const std::string& format) { } ghoul_assert( _timeIdProviderMap.find(format) != _timeIdProviderMap.end(), - "Unsupported Time format: " << format + "Unsupported Time format: " + format ); return _timeIdProviderMap[format].get(); } diff --git a/modules/space/rendering/renderableplanet.cpp b/modules/space/rendering/renderableplanet.cpp index cceedf0122..a5a9e7a691 100644 --- a/modules/space/rendering/renderableplanet.cpp +++ b/modules/space/rendering/renderableplanet.cpp @@ -83,8 +83,11 @@ RenderablePlanet::RenderablePlanet(const ghoul::Dictionary& dictionary) { std::string name; bool success = dictionary.getValue(SceneGraphNode::KeyName, name); - ghoul_assert(success, - "RenderablePlanet need the '" << SceneGraphNode::KeyName<<"' be specified"); + ghoul_assert( + success, + std::string("RenderablePlanet need the '") + SceneGraphNode::KeyName + + "' be specified" + ); ghoul::Dictionary geometryDictionary; success = dictionary.getValue(keyGeometry, geometryDictionary); diff --git a/src/documentation/documentationengine.cpp b/src/documentation/documentationengine.cpp index 5ce0311aea..2f90737a73 100644 --- a/src/documentation/documentationengine.cpp +++ b/src/documentation/documentationengine.cpp @@ -31,6 +31,7 @@ #include #include +#include #include #include diff --git a/src/engine/downloadmanager.cpp b/src/engine/downloadmanager.cpp index 8c57588f6b..42d6c7afac 100644 --- a/src/engine/downloadmanager.cpp +++ b/src/engine/downloadmanager.cpp @@ -162,7 +162,10 @@ std::shared_ptr DownloadManager::downloadFile( std::shared_ptr future = std::make_shared(file.filename()); errno = 0; FILE* fp = fopen(file.path().c_str(), "wb"); // write binary - ghoul_assert(fp != nullptr, "Could not open/create file:\n" << file.path().c_str() << " \nerrno: " << errno); + ghoul_assert( + fp != nullptr, + "Could not open/create file:\n" + file.path() + " \nerrno: " + std::to_string(errno) + ); //LDEBUG("Start downloading file: '" << url << "' into file '" << file.path() << "'"); diff --git a/src/rendering/renderable.cpp b/src/rendering/renderable.cpp index 4725e220c9..ab22ebe710 100644 --- a/src/rendering/renderable.cpp +++ b/src/rendering/renderable.cpp @@ -106,7 +106,7 @@ Renderable::Renderable(const ghoul::Dictionary& dictionary) { ghoul_assert( dictionary.hasKeyAndValue(SceneGraphNode::KeyName), - "SceneGraphNode must specify '" << SceneGraphNode::KeyName << "'" + std::string("SceneGraphNode must specify '") + SceneGraphNode::KeyName + "'" ); dictionary.getValue(keyStart, _startTime); diff --git a/src/util/factorymanager.cpp b/src/util/factorymanager.cpp index 404d80a4f8..3c13b6fcc8 100644 --- a/src/util/factorymanager.cpp +++ b/src/util/factorymanager.cpp @@ -30,15 +30,16 @@ #include #include +#include namespace { - const std::string MainTemplateFilename = "${OPENSPACE_DATA}/web/factories/main.hbs"; - const std::string FactoryTemplateFilename = "${OPENSPACE_DATA}/web/factories/factory.hbs"; - const std::string HandlebarsFilename = "${OPENSPACE_DATA}/web/common/handlebars-v4.0.5.js"; - const std::string JsFilename = "${OPENSPACE_DATA}/web/factories/script.js"; - const std::string BootstrapFilename = "${OPENSPACE_DATA}/web/common/bootstrap.min.css"; - const std::string CssFilename = "${OPENSPACE_DATA}/web/common/style.css"; -} + const char* MainTemplateFilename = "${OPENSPACE_DATA}/web/factories/main.hbs"; + const char* FactoryTemplateFilename = "${OPENSPACE_DATA}/web/factories/factory.hbs"; + const char* HandlebarsFilename = "${OPENSPACE_DATA}/web/common/handlebars-v4.0.5.js"; + const char* JsFilename = "${OPENSPACE_DATA}/web/factories/script.js"; + const char* BootstrapFilename = "${OPENSPACE_DATA}/web/common/bootstrap.min.css"; + const char* CssFilename = "${OPENSPACE_DATA}/web/common/style.css"; +} // namespace namespace openspace {