mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-19 11:29:08 -06:00
Remove warnings
Update Ghoul repository Fix spelling mistake in openspace.cfg
This commit is contained in:
@@ -42,10 +42,16 @@
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include <Windows.h>
|
||||
#include <dbghelp.h>
|
||||
#include <shellapi.h>
|
||||
#include <shlobj.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable : 4091)
|
||||
#include <dbghelp.h>
|
||||
#pragma warning (pop)
|
||||
#endif // _MSC_VER
|
||||
|
||||
#endif // WIN32
|
||||
|
||||
#ifdef OPENVR_SUPPORT
|
||||
|
||||
Submodule ext/ghoul updated: 16af15c4ee...b362a77feb
@@ -66,7 +66,7 @@ struct CameraKeyframe {
|
||||
// Follow focus node rotation?
|
||||
buffer.insert(buffer.end(), reinterpret_cast<char*>(&_followNodeRotation), reinterpret_cast<char*>(&_followNodeRotation) + sizeof(_followNodeRotation));
|
||||
|
||||
int nodeNameLength = _focusNode.size();
|
||||
int nodeNameLength = static_cast<int>(_focusNode.size());
|
||||
|
||||
// Add focus node
|
||||
buffer.insert(buffer.end(), reinterpret_cast<char*>(&nodeNameLength), reinterpret_cast<char*>(&nodeNameLength) + sizeof(nodeNameLength));
|
||||
|
||||
@@ -91,6 +91,6 @@ bool compareKeyframeTimeWithTime(const KeyframeBase& a, double b);
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
#include <openspace/util/timeline.inl>;
|
||||
#include <openspace/util/timeline.inl>
|
||||
|
||||
#endif // __OPENSPACE_CORE___TIMELINE___H__
|
||||
|
||||
@@ -325,7 +325,7 @@ void RenderableFieldlines::loadSeedPoints() {
|
||||
loadSeedPointsFromTable();
|
||||
break;
|
||||
default:
|
||||
ghoul_assert(false, "Missing case label");
|
||||
throw ghoul::MissingCaseException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ Geodetic2 GeodeticPatch::getCorner(Quad q) const {
|
||||
case NORTH_EAST: return Geodetic2(maxLat(), maxLon());// northEastCorner();
|
||||
case SOUTH_WEST: return Geodetic2(minLat(), minLon());// southWestCorner();
|
||||
case SOUTH_EAST: return Geodetic2(minLat(), maxLon());// southEastCorner();
|
||||
default: ghoul_assert(false, "Missing case label");
|
||||
default: throw ghoul::MissingCaseException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -240,16 +240,11 @@ int PixelRegion::area() const {
|
||||
|
||||
int PixelRegion::edge(Side side) const {
|
||||
switch (side) {
|
||||
case Side::LEFT:
|
||||
return start.x;
|
||||
case Side::TOP:
|
||||
return start.y;
|
||||
case Side::RIGHT:
|
||||
return start.x + numPixels.x;
|
||||
case Side::BOTTOM:
|
||||
return start.y + numPixels.y;
|
||||
default:
|
||||
ghoul_assert(false, "Missing case label");
|
||||
case Side::LEFT: return start.x;
|
||||
case Side::TOP: return start.y;
|
||||
case Side::RIGHT: return start.x + numPixels.x;
|
||||
case Side::BOTTOM: return start.y + numPixels.y;
|
||||
default: throw ghoul::MissingCaseException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -653,19 +653,11 @@ void RenderableFov::computeIntercepts(const UpdateData& data, const std::string&
|
||||
break;
|
||||
}
|
||||
case ThisIntersect:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case NextIntersect:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case BothIntersect:
|
||||
{
|
||||
break;
|
||||
}
|
||||
default:
|
||||
ghoul_assert(false, "Missing case label");
|
||||
throw ghoul::MissingCaseException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -364,7 +364,8 @@ void GUI::initializeGL() {
|
||||
_fontTexture->setDataOwnership(ghoul::opengl::Texture::TakeOwnership::No);
|
||||
_fontTexture->uploadTexture();
|
||||
GLuint id = *_fontTexture;
|
||||
ImGui::GetIO().Fonts->TexID = reinterpret_cast<void*>(id);
|
||||
uint64_t tmp = id;
|
||||
ImGui::GetIO().Fonts->TexID = reinterpret_cast<void*>(tmp);
|
||||
|
||||
glGenBuffers(1, &vbo);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, vbo);
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
namespace {
|
||||
using json = nlohmann::json;
|
||||
const ImVec2 size = ImVec2(350, 500);
|
||||
const ImVec2 WindowSize = ImVec2(350, 500);
|
||||
} // namespace
|
||||
|
||||
namespace openspace {
|
||||
@@ -59,7 +59,7 @@ void GuiIswaComponent::render() {
|
||||
|
||||
bool e = _isEnabled;
|
||||
|
||||
ImGui::Begin("ISWA", &e, size, 0.5f);
|
||||
ImGui::Begin("ISWA", &e, WindowSize, 0.5f);
|
||||
|
||||
_isEnabled = e;
|
||||
|
||||
|
||||
@@ -41,8 +41,8 @@ RenderableToyVolume::RenderableToyVolume(const ghoul::Dictionary& dictionary)
|
||||
, _stepSize("stepSize", "Step Size", 0.02, 0.01, 1)
|
||||
, _scaling("scaling", "Scaling", glm::vec3(1.0, 1.0, 1.0), glm::vec3(0.0), glm::vec3(10.0))
|
||||
, _translation("translation", "Translation", glm::vec3(0.0, 0.0, 0.0), glm::vec3(0.0), glm::vec3(10.0))
|
||||
, _rotation("rotation", "Euler rotation", glm::vec3(0.0, 0.0, 0.0), glm::vec3(0), glm::vec3(6.28))
|
||||
, _color("color", "Color", glm::vec4(1.0, 0.0, 0.0, 0.1), glm::vec4(0.0), glm::vec4(1.0)) {
|
||||
, _rotation("rotation", "Euler rotation", glm::vec3(0.f, 0.f, 0.f), glm::vec3(0), glm::vec3(6.28f))
|
||||
, _color("color", "Color", glm::vec4(1.f, 0.f, 0.f, 0.1f), glm::vec4(0.f), glm::vec4(1.f)) {
|
||||
|
||||
float scalingExponent, stepSize;
|
||||
glm::vec3 scaling, translation, rotation;
|
||||
|
||||
@@ -79,7 +79,7 @@ return {
|
||||
-- OnScreenTextScaling = "framebuffer",
|
||||
-- PerSceneCache = true,
|
||||
-- DisableRenderingOnMaster = true,
|
||||
KeyDisableSceneOnMaster = true,
|
||||
-- DisableSceneOnMaster = true,
|
||||
DownloadRequestURL = "http://data.openspaceproject.com/request.cgi",
|
||||
RenderingMethod = "Framebuffer",
|
||||
OpenGLDebugContext = {
|
||||
|
||||
@@ -80,7 +80,8 @@ std::string to_string(openspace::documentation::TestResult::Offense::Reason reas
|
||||
case openspace::documentation::TestResult::Offense::Reason::WrongType:
|
||||
return "Wrong type";
|
||||
default:
|
||||
ghoul_assert(false, "Missing case label");
|
||||
throw ghoul::MissingCaseException();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +90,7 @@ std::string to_string(openspace::documentation::TestResult::Warning::Reason reas
|
||||
case openspace::documentation::TestResult::Warning::Reason::Deprecated:
|
||||
return "Deprecated";
|
||||
default:
|
||||
ghoul_assert(false, "Missing case label");
|
||||
throw ghoul::MissingCaseException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -298,6 +298,7 @@ std::string DocumentationEngine::generateJson() const {
|
||||
|
||||
void DocumentationEngine::addDocumentation(Documentation doc) {
|
||||
for (const DocumentationEntry& e : doc.entries) {
|
||||
(void)e; // Unused variable in Release mode
|
||||
ghoul_assert(
|
||||
e.documentation.find('"') == std::string::npos,
|
||||
"Documentation cannot contain \" character"
|
||||
|
||||
@@ -52,6 +52,7 @@ DocumentationGenerator::DocumentationGenerator(std::string name,
|
||||
ghoul_precondition(!_name.empty(), "name must not be empty");
|
||||
ghoul_precondition(!_jsonName.empty(), "jsonName must not be empty");
|
||||
for (const HandlebarTemplate& t : _handlebarTemplates) {
|
||||
(void)t; // Unused variable in Release mode
|
||||
ghoul_precondition(!t.name.empty(), "name must not be empty");
|
||||
ghoul_precondition(!t.filename.empty(), "filename must not be empty");
|
||||
}
|
||||
|
||||
@@ -169,19 +169,21 @@ std::shared_ptr<DownloadManager::FileFuture> DownloadManager::downloadFile(
|
||||
#ifdef WIN32
|
||||
FILE* fp;
|
||||
errno_t error = fopen_s(&fp, file.path().c_str(), "wb");
|
||||
ghoul_assert(
|
||||
error == 0,
|
||||
"Could not open/create file:" + file.path() + ". Errno: " + std::to_string(errno)
|
||||
);
|
||||
if (error != 0) {
|
||||
LERROR(
|
||||
"Could not open/create file:" + file.path() +
|
||||
". Errno: " + std::to_string(errno)
|
||||
);
|
||||
}
|
||||
#else
|
||||
FILE* fp = fopen(file.path().c_str(), "wb"); // write binary
|
||||
#endif // WIN32
|
||||
ghoul_assert(
|
||||
fp != nullptr,
|
||||
"Could not open/create file:" + file.path() + ". Errno: " + std::to_string(errno)
|
||||
);
|
||||
|
||||
//LDEBUG("Start downloading file: '" << url << "' into file '" << file.path() << "'");
|
||||
if (!fp) {
|
||||
LERROR(
|
||||
"Could not open/create file:" + file.path() +
|
||||
". Errno: " + std::to_string(errno)
|
||||
);
|
||||
}
|
||||
|
||||
auto downloadFunction = [url,
|
||||
failOnError,
|
||||
|
||||
@@ -212,7 +212,9 @@ std::unique_ptr<ghoul::logging::Log> createLog(const ghoul::Dictionary& dictiona
|
||||
);
|
||||
}
|
||||
}
|
||||
ghoul_assert(false, "Missing case in the documentation for LogFactory");
|
||||
else {
|
||||
throw ghoul::MissingCaseException();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -953,7 +953,7 @@ void OpenSpaceEngine::initializeGL() {
|
||||
LDEBUGC(category, std::string(message));
|
||||
break;
|
||||
default:
|
||||
ghoul_assert(false, "Missing case label");
|
||||
throw ghoul::MissingCaseException();
|
||||
}
|
||||
};
|
||||
ghoul::opengl::debug::setDebugCallback(callback);
|
||||
@@ -1308,7 +1308,7 @@ void OpenSpaceEngine::registerModuleCallback(OpenSpaceEngine::CallbackOption opt
|
||||
_moduleCallbacks.postDraw.push_back(std::move(function));
|
||||
break;
|
||||
default:
|
||||
ghoul_assert(false, "Missing case label");
|
||||
throw ghoul::MissingCaseException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -158,6 +158,7 @@ int SGCTWindowWrapper::currentNumberOfAaSamples() const {
|
||||
bool SGCTWindowWrapper::isRegularRendering() const {
|
||||
sgct::SGCTWindow* w = sgct::Engine::instance()->getCurrentWindowPtr();
|
||||
std::size_t nViewports = w->getNumberOfViewports();
|
||||
(void)nViewports; // Unused in Release mode
|
||||
ghoul_assert(nViewports > 0, "At least one viewport must exist at this time");
|
||||
sgct_core::Viewport* vp = w->getViewport(0);
|
||||
sgct_core::NonLinearProjection* nlp = vp->getNonLinearProjectionPtr();
|
||||
|
||||
@@ -94,9 +94,9 @@ ParallelConnection::ParallelConnection()
|
||||
, _address("address", "Address", "localhost")
|
||||
, _name("name", "Connection name", "Anonymous")
|
||||
, _bufferTime("bufferTime", "Buffer Time", 1, 0.5, 10)
|
||||
, _timeKeyframeInterval("timeKeyframeInterval", "Time keyframe interval", 0.1, 0, 1)
|
||||
, _cameraKeyframeInterval("cameraKeyframeInterval", "Camera Keyframe interval", 0.1, 0, 1)
|
||||
, _timeTolerance("timeTolerance", "Time tolerance", 1, 0.5, 5)
|
||||
, _timeKeyframeInterval("timeKeyframeInterval", "Time keyframe interval", 0.1f, 0.f, 1.f)
|
||||
, _cameraKeyframeInterval("cameraKeyframeInterval", "Camera Keyframe interval", 0.1f, 0.f, 1.f)
|
||||
, _timeTolerance("timeTolerance", "Time tolerance", 1.f, 0.5f, 5.f)
|
||||
, _lastTimeKeyframeTimestamp(0)
|
||||
, _lastCameraKeyframeTimestamp(0)
|
||||
, _clientSocket(INVALID_SOCKET)
|
||||
|
||||
@@ -70,9 +70,11 @@ std::unique_ptr<Renderable> Renderable::createFromDictionary(
|
||||
const ghoul::Dictionary& dictionary)
|
||||
{
|
||||
// The name is passed down from the SceneGraphNode
|
||||
std::string name;
|
||||
bool success = dictionary.getValue(SceneGraphNode::KeyName, name);
|
||||
ghoul_assert(success, "The SceneGraphNode did not set the 'name' key");
|
||||
ghoul_assert(
|
||||
dictionary.hasKeyAndValue<std::string>(SceneGraphNode::KeyName),
|
||||
"The SceneGraphNode did not set the 'name' key"
|
||||
);
|
||||
std::string name = dictionary.value<std::string>(SceneGraphNode::KeyName);
|
||||
|
||||
documentation::testSpecificationAndThrow(Documentation(), dictionary, "Renderable");
|
||||
|
||||
|
||||
@@ -179,7 +179,9 @@ int property_setValueSingle(lua_State* L) {
|
||||
for (properties::Property* prop : allProperties()) {
|
||||
std::string propFullId = prop->fullyQualifiedIdentifier();
|
||||
//Look for a match in the uri with the group name (first term) removed
|
||||
int propMatchLength = propFullId.length() - pathRemainderToMatch.length();
|
||||
int propMatchLength =
|
||||
static_cast<int>(propFullId.length()) -
|
||||
static_cast<int>(pathRemainderToMatch.length());
|
||||
|
||||
if (propMatchLength >= 0) {
|
||||
std::string thisPropMatchId = propFullId.substr(propMatchLength);
|
||||
@@ -289,7 +291,7 @@ int property_setValueRegex(lua_State* L) {
|
||||
}
|
||||
catch (const std::regex_error& e) {
|
||||
LERRORC("property_setValueRegex", "Malformed regular expression: '"
|
||||
<< regex << "'");
|
||||
<< regex << "':" << e.what());
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -129,7 +129,7 @@ std::string to_string(openspace::Key key) {
|
||||
return p.first;
|
||||
}
|
||||
}
|
||||
ghoul_assert(false, "Missing key in KeyMapping");
|
||||
throw ghoul::MissingCaseException();
|
||||
}
|
||||
|
||||
std::string to_string(openspace::KeyModifier mod) {
|
||||
|
||||
@@ -75,7 +75,8 @@ namespace {
|
||||
case openspace::SpiceManager::FieldOfViewMethod::Point:
|
||||
return "POINT";
|
||||
default:
|
||||
ghoul_assert(false, "Missing case label");
|
||||
throw ghoul::MissingCaseException();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +87,8 @@ namespace {
|
||||
case openspace::SpiceManager::TerminatorType::Penumbral:
|
||||
return "PENUMBRAL";
|
||||
default:
|
||||
ghoul_assert(false, "Missing case label");
|
||||
throw ghoul::MissingCaseException();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -148,7 +150,7 @@ SpiceManager::AberrationCorrection::operator const char*() const {
|
||||
case Type::ConvergedNewtonianStellar:
|
||||
return (direction == Direction::Reception) ? "CN+S" : "XCN+S";
|
||||
default:
|
||||
ghoul_assert(false, "Missing case label");
|
||||
throw ghoul::MissingCaseException();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user