mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-03 18:19:38 -06:00
Update Ghoul repository
Adapt to changed signature of ghoul_assert macro
This commit is contained in:
Submodule ext/ghoul updated: f7fcee5973...e0cbca16ad
@@ -25,6 +25,7 @@
|
||||
#include <ghoul/misc/dictionary.h>
|
||||
|
||||
#include <iterator>
|
||||
#include <sstream>
|
||||
|
||||
namespace std {
|
||||
std::string to_string(std::string value);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
|
||||
#include <ghoul/misc/dictionary.h>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
namespace {
|
||||
const char* KeyLevel = "Level";
|
||||
const char* KeyX = "X";
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <ghoul/filesystem/filesystem.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <streambuf>
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
@@ -162,7 +162,10 @@ std::shared_ptr<DownloadManager::FileFuture> DownloadManager::downloadFile(
|
||||
std::shared_ptr<FileFuture> future = std::make_shared<FileFuture>(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() << "'");
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ Renderable::Renderable(const ghoul::Dictionary& dictionary)
|
||||
{
|
||||
ghoul_assert(
|
||||
dictionary.hasKeyAndValue<std::string>(SceneGraphNode::KeyName),
|
||||
"SceneGraphNode must specify '" << SceneGraphNode::KeyName << "'"
|
||||
std::string("SceneGraphNode must specify '") + SceneGraphNode::KeyName + "'"
|
||||
);
|
||||
|
||||
dictionary.getValue(keyStart, _startTime);
|
||||
|
||||
@@ -30,15 +30,16 @@
|
||||
|
||||
#include <iterator>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user