From 3a7f221793641bce7c8702c6a095b8f9bb6e128b Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Mon, 13 Nov 2017 16:22:07 -0500 Subject: [PATCH] Remove GCC warnings --- ext/ghoul | 2 +- .../properties/numericalproperty.inl | 32 ++++++------- modules/base/rendering/multimodelgeometry.h | 2 +- modules/base/rotation/fixedrotation.cpp | 12 ++--- modules/debugging/rendering/debugrenderer.cpp | 9 +++- .../projectedareaevaluator.h | 3 +- modules/globebrowsing/globebrowsingmodule.cpp | 9 +--- modules/globebrowsing/globes/pointglobe.cpp | 2 +- modules/globebrowsing/meshes/trianglesoup.cpp | 18 ++++---- .../rendering/layer/layergroup.cpp | 4 +- modules/globebrowsing/tile/rawtile.cpp | 2 +- modules/globebrowsing/tile/tileindex.cpp | 4 +- .../tile/tileprovider/texttileprovider.cpp | 2 +- .../tile/tiletextureinitdata.cpp | 2 +- modules/imgui/src/guiparallelcomponent.cpp | 1 - modules/imgui/src/guipropertycomponent.cpp | 2 +- modules/imgui/src/guispacetimecomponent.cpp | 4 +- modules/touch/src/touchinteraction.cpp | 7 ++- src/network/parallelconnection.cpp | 3 +- src/properties/matrix/dmat2property.cpp | 2 +- src/properties/matrix/dmat2x3property.cpp | 2 +- src/properties/matrix/dmat2x4property.cpp | 2 +- src/properties/matrix/dmat3property.cpp | 2 +- src/properties/matrix/dmat3x2property.cpp | 2 +- src/properties/matrix/dmat3x4property.cpp | 2 +- src/properties/matrix/dmat4property.cpp | 2 +- src/properties/matrix/dmat4x2property.cpp | 2 +- src/properties/matrix/dmat4x3property.cpp | 2 +- src/properties/matrix/mat2property.cpp | 2 +- src/properties/matrix/mat2x3property.cpp | 2 +- src/properties/matrix/mat2x4property.cpp | 2 +- src/properties/matrix/mat3property.cpp | 2 +- src/properties/matrix/mat3x2property.cpp | 2 +- src/properties/matrix/mat3x4property.cpp | 2 +- src/properties/matrix/mat4property.cpp | 2 +- src/properties/matrix/mat4x2property.cpp | 2 +- src/properties/matrix/mat4x3property.cpp | 2 +- src/properties/propertyowner.cpp | 8 ++-- src/properties/scalar/boolproperty.cpp | 2 +- src/properties/scalar/charproperty.cpp | 2 +- src/properties/scalar/doubleproperty.cpp | 2 +- src/properties/scalar/floatproperty.cpp | 2 +- src/properties/scalar/intproperty.cpp | 2 +- src/properties/scalar/longdoubleproperty.cpp | 2 +- src/properties/scalar/longlongproperty.cpp | 2 +- src/properties/scalar/longproperty.cpp | 2 +- src/properties/scalar/shortproperty.cpp | 2 +- src/properties/scalar/signedcharproperty.cpp | 2 +- src/properties/scalar/ucharproperty.cpp | 2 +- src/properties/scalar/uintproperty.cpp | 2 +- src/properties/scalar/ulonglongproperty.cpp | 2 +- src/properties/scalar/ulongproperty.cpp | 2 +- src/properties/scalar/ushortproperty.cpp | 2 +- src/properties/stringproperty.cpp | 45 ++++++++++--------- src/properties/vector/bvec2property.cpp | 2 +- src/properties/vector/bvec3property.cpp | 2 +- src/properties/vector/bvec4property.cpp | 2 +- src/properties/vector/dvec2property.cpp | 2 +- src/properties/vector/dvec3property.cpp | 2 +- src/properties/vector/dvec4property.cpp | 2 +- src/properties/vector/ivec2property.cpp | 2 +- src/properties/vector/ivec3property.cpp | 2 +- src/properties/vector/ivec4property.cpp | 2 +- src/properties/vector/uvec2property.cpp | 2 +- src/properties/vector/uvec3property.cpp | 2 +- src/properties/vector/uvec4property.cpp | 2 +- src/properties/vector/vec2property.cpp | 2 +- src/properties/vector/vec3property.cpp | 2 +- src/properties/vector/vec4property.cpp | 2 +- src/rendering/loadingscreen.cpp | 4 -- src/util/progressbar.cpp | 2 +- src/util/threadpool.cpp | 4 +- 72 files changed, 140 insertions(+), 139 deletions(-) diff --git a/ext/ghoul b/ext/ghoul index 4dce717aac..79a336b773 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 4dce717aac293edd8662d03cc336da355c797343 +Subproject commit 79a336b7731ca64e00ab82769c93bc799d041ed5 diff --git a/include/openspace/properties/numericalproperty.inl b/include/openspace/properties/numericalproperty.inl index 3a64404e31..c0a07e3127 100644 --- a/include/openspace/properties/numericalproperty.inl +++ b/include/openspace/properties/numericalproperty.inl @@ -141,27 +141,27 @@ namespace openspace::properties { \ template <> \ template <> \ - TYPE PropertyDelegate>::fromLuaValue(lua_State* state, \ - bool& success) \ + TYPE PropertyDelegate>::fromLuaValue(lua_State* lua, \ + bool& successful) \ { \ - return FROM_LUA_LAMBDA_EXPRESSION(state, success); \ + return FROM_LUA_LAMBDA_EXPRESSION(lua, successful); \ } \ \ template <> \ template <> \ - TYPE PropertyDelegate>::fromLuaValue(lua_State* state, \ - bool& success) \ + TYPE PropertyDelegate>::fromLuaValue(lua_State* lua, \ + bool& successful) \ { \ return PropertyDelegate>::fromLuaValue( \ - state, success); \ + lua, successful); \ } \ \ template <> \ template <> \ - bool PropertyDelegate>::toLuaValue(lua_State* state, \ + bool PropertyDelegate>::toLuaValue(lua_State* lua, \ TYPE value) \ { \ - return TO_LUA_LAMBDA_EXPRESSION(state, value); \ + return TO_LUA_LAMBDA_EXPRESSION(lua, value); \ } \ \ template <> \ @@ -187,9 +187,9 @@ namespace openspace::properties { template <> \ template <> \ TYPE PropertyDelegate>::fromString(std::string value, \ - bool& success) \ + bool& successful) \ { \ - return FROM_STRING_LAMBDA_EXPRESSION(value, success); \ + return FROM_STRING_LAMBDA_EXPRESSION(value, successful); \ } \ \ template <> \ @@ -205,18 +205,18 @@ namespace openspace::properties { \ template <> \ template <> \ - bool PropertyDelegate>::toString(std::string& outValue, \ - TYPE inValue) \ + bool PropertyDelegate>::toString(std::string& out, \ + TYPE in) \ { \ - return TO_STRING_LAMBDA_EXPRESSION(outValue, inValue); \ + return TO_STRING_LAMBDA_EXPRESSION(out, in); \ } \ \ template <> \ template <> \ - bool PropertyDelegate>::toString(std::string& outValue, \ - TYPE inValue) \ + bool PropertyDelegate>::toString(std::string& out, \ + TYPE in) \ { \ - return PropertyDelegate>::toString(outValue, inValue); \ + return PropertyDelegate>::toString(out, in); \ } diff --git a/modules/base/rendering/multimodelgeometry.h b/modules/base/rendering/multimodelgeometry.h index d062cda355..a276bdc342 100644 --- a/modules/base/rendering/multimodelgeometry.h +++ b/modules/base/rendering/multimodelgeometry.h @@ -39,7 +39,7 @@ public: MultiModelGeometry(const ghoul::Dictionary& dictionary); private: - bool loadModel(const std::string& filename); + virtual bool loadModel(const std::string& filename) override; }; } // namespace openspace::modelgeometry diff --git a/modules/base/rotation/fixedrotation.cpp b/modules/base/rotation/fixedrotation.cpp index 00729a5a5b..df05dbb397 100644 --- a/modules/base/rotation/fixedrotation.cpp +++ b/modules/base/rotation/fixedrotation.cpp @@ -574,8 +574,8 @@ glm::vec3 FixedRotation::xAxis() const { case Axis::Type::Object: if (_xAxis.node && _attachedNode) { glm::vec3 dir = glm::vec3(glm::normalize( - glm::dvec3(_xAxis.node->worldPosition()) - - glm::dvec3(_attachedNode->worldPosition()) + _xAxis.node->worldPosition() - + _attachedNode->worldPosition() )); return _xAxis.invertObject ? -dir : dir; } @@ -629,8 +629,8 @@ glm::vec3 FixedRotation::yAxis() const { case Axis::Type::Object: if (_yAxis.node && _attachedNode) { glm::vec3 dir = glm::vec3(glm::normalize( - glm::dvec3(_yAxis.node->worldPosition()) - - glm::dvec3(_attachedNode->worldPosition()) + _yAxis.node->worldPosition() - + _attachedNode->worldPosition() )); return _yAxis.invertObject ? -dir : dir; } @@ -684,8 +684,8 @@ glm::vec3 FixedRotation::zAxis() const { case Axis::Type::Object: if (_zAxis.node && _attachedNode) { glm::vec3 dir = glm::vec3(glm::normalize( - glm::dvec3(_zAxis.node->worldPosition()) - - glm::dvec3(_attachedNode->worldPosition()) + _zAxis.node->worldPosition() - + _attachedNode->worldPosition() )); return _zAxis.invertObject ? -dir : dir; } diff --git a/modules/debugging/rendering/debugrenderer.cpp b/modules/debugging/rendering/debugrenderer.cpp index bfabe1cd25..5f6ebcc8ac 100644 --- a/modules/debugging/rendering/debugrenderer.cpp +++ b/modules/debugging/rendering/debugrenderer.cpp @@ -107,7 +107,14 @@ void DebugRenderer::renderVertices(const Vertices& clippingSpacePoints, GLenum m glEnableVertexAttribArray(0); - glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, sizeof(clippingSpacePoints[0]), 0); + glVertexAttribPointer( + 0, + 4, + GL_FLOAT, + GL_FALSE, + sizeof(clippingSpacePoints[0]), + nullptr + ); // Draw the vertices glDrawArrays(mode, 0, static_cast(clippingSpacePoints.size())); diff --git a/modules/globebrowsing/chunk/chunklevelevaluator/projectedareaevaluator.h b/modules/globebrowsing/chunk/chunklevelevaluator/projectedareaevaluator.h index 8211848627..70aecee378 100644 --- a/modules/globebrowsing/chunk/chunklevelevaluator/projectedareaevaluator.h +++ b/modules/globebrowsing/chunk/chunklevelevaluator/projectedareaevaluator.h @@ -38,7 +38,8 @@ namespace openspace::globebrowsing::chunklevelevaluator { */ class ProjectedArea : public Evaluator { public: - virtual int getDesiredLevel(const Chunk& chunk, const RenderData& data) const; + virtual int getDesiredLevel( + const Chunk& chunk, const RenderData& data) const override; }; } // namespace openspace::globebrowsing::chunklevelevaluator diff --git a/modules/globebrowsing/globebrowsingmodule.cpp b/modules/globebrowsing/globebrowsingmodule.cpp index 4d9dc9f22d..b8fd5a5626 100644 --- a/modules/globebrowsing/globebrowsingmodule.cpp +++ b/modules/globebrowsing/globebrowsingmodule.cpp @@ -494,16 +494,11 @@ std::string GlobeBrowsingModule::layerTypeNamesList() { void GlobeBrowsingModule::loadWMSCapabilities(std::string name, std::string globe, std::string url) { - auto downloadFunction = [](const std::string& url) { + auto downloadFunction = [](const std::string& downloadUrl) { GDALDatasetH dataset = GDALOpen( - url.c_str(), + downloadUrl.c_str(), GA_ReadOnly ); - // GDAL_OF_READONLY | GDAL_OF_RASTER | GDAL_OF_VERBOSE_ERROR, - // nullptr, - // nullptr, - // nullptr - //); char** subDatasets = GDALGetMetadata(dataset, "SUBDATASETS"); int nSubdatasets = CSLCount(subDatasets); diff --git a/modules/globebrowsing/globes/pointglobe.cpp b/modules/globebrowsing/globes/pointglobe.cpp index e39b47ece8..630cbd300c 100644 --- a/modules/globebrowsing/globes/pointglobe.cpp +++ b/modules/globebrowsing/globes/pointglobe.cpp @@ -95,7 +95,7 @@ void PointGlobe::initialize() { // Position at location 0 glEnableVertexAttribArray(0); - glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, sizeof(glm::vec2), 0); + glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, sizeof(glm::vec2), nullptr); glBindVertexArray(0); } diff --git a/modules/globebrowsing/meshes/trianglesoup.cpp b/modules/globebrowsing/meshes/trianglesoup.cpp index e83b9d4506..428aa3ed98 100644 --- a/modules/globebrowsing/meshes/trianglesoup.cpp +++ b/modules/globebrowsing/meshes/trianglesoup.cpp @@ -55,10 +55,10 @@ void TriangleSoup::setVertexPositions(std::vector positions) { _gpuDataNeedUpdate = true; _vertexData.resize(positions.size()); for (size_t i = 0; i < positions.size(); i++) { - _vertexData[i].position[0] = static_cast(positions[i].x); - _vertexData[i].position[1] = static_cast(positions[i].y); - _vertexData[i].position[2] = static_cast(positions[i].z); - _vertexData[i].position[3] = static_cast(positions[i].w); + _vertexData[i].position[0] = positions[i].x; + _vertexData[i].position[1] = positions[i].y; + _vertexData[i].position[2] = positions[i].z; + _vertexData[i].position[3] = positions[i].w; } } @@ -67,8 +67,8 @@ void TriangleSoup::setVertexTextureCoordinates(std::vector textures) _gpuDataNeedUpdate = true; _vertexData.resize(textures.size()); for (size_t i = 0; i < textures.size(); i++) { - _vertexData[i].texture[0] = static_cast(textures[i].s); - _vertexData[i].texture[1] = static_cast(textures[i].t); + _vertexData[i].texture[0] = textures[i].s; + _vertexData[i].texture[1] = textures[i].t; } } @@ -77,9 +77,9 @@ void TriangleSoup::setVertexNormals(std::vector normals) { _gpuDataNeedUpdate = true; _vertexData.resize(normals.size()); for (size_t i = 0; i < normals.size(); i++) { - _vertexData[i].normal[0] = static_cast(normals[i].x); - _vertexData[i].normal[1] = static_cast(normals[i].y); - _vertexData[i].normal[2] = static_cast(normals[i].z); + _vertexData[i].normal[0] = normals[i].x; + _vertexData[i].normal[1] = normals[i].y; + _vertexData[i].normal[2] = normals[i].z; } } diff --git a/modules/globebrowsing/rendering/layer/layergroup.cpp b/modules/globebrowsing/rendering/layer/layergroup.cpp index cd089d58c3..df0105a357 100644 --- a/modules/globebrowsing/rendering/layer/layergroup.cpp +++ b/modules/globebrowsing/rendering/layer/layergroup.cpp @@ -69,8 +69,8 @@ LayerGroup::LayerGroup(layergroupid::GroupID id, const ghoul::Dictionary& dict) try { addLayer(fallbackLayerDict); } - catch (const ghoul::RuntimeError& e) { - LERRORC(e.component, e.message); + catch (const ghoul::RuntimeError& except) { + LERRORC(except.component, except.message); continue; } } diff --git a/modules/globebrowsing/tile/rawtile.cpp b/modules/globebrowsing/tile/rawtile.cpp index 43a93496bc..e4a093f5c1 100644 --- a/modules/globebrowsing/tile/rawtile.cpp +++ b/modules/globebrowsing/tile/rawtile.cpp @@ -43,7 +43,7 @@ RawTile RawTile::createDefault(const TileTextureInitData& initData) { defaultRes.textureInitData = std::make_shared(initData); defaultRes.imageData = new char[initData.totalNumBytes()]; std::fill_n( - static_cast(defaultRes.imageData), + defaultRes.imageData, initData.totalNumBytes(), char(0) ); diff --git a/modules/globebrowsing/tile/tileindex.cpp b/modules/globebrowsing/tile/tileindex.cpp index 992e2dce67..72f66bb578 100644 --- a/modules/globebrowsing/tile/tileindex.cpp +++ b/modules/globebrowsing/tile/tileindex.cpp @@ -38,8 +38,8 @@ namespace { namespace openspace::globebrowsing { -TileIndex::TileIndex(int x, int y, int level) - : x(x), y(y), level(level) +TileIndex::TileIndex(int x_, int y_, int level_) + : x(x_), y(y_), level(level_) {} TileIndex::TileIndex(const TileIndex& other) diff --git a/modules/globebrowsing/tile/tileprovider/texttileprovider.cpp b/modules/globebrowsing/tile/tileprovider/texttileprovider.cpp index 7bda8f1da7..c2a966457c 100644 --- a/modules/globebrowsing/tile/tileprovider/texttileprovider.cpp +++ b/modules/globebrowsing/tile/tileprovider/texttileprovider.cpp @@ -56,7 +56,7 @@ bool TextTileProvider::initialize() { _font = OsEng.fontManager().font("Mono", static_cast(_fontSize)); - _fontRenderer = std::unique_ptr(FontRenderer::createDefault()); + _fontRenderer = FontRenderer::createDefault(); _fontRenderer->setFramebufferSize(glm::vec2(_initData.dimensions())); glGenFramebuffers(1, &_fbo); diff --git a/modules/globebrowsing/tile/tiletextureinitdata.cpp b/modules/globebrowsing/tile/tiletextureinitdata.cpp index 683a0c9ea9..2e2e039c98 100644 --- a/modules/globebrowsing/tile/tiletextureinitdata.cpp +++ b/modules/globebrowsing/tile/tiletextureinitdata.cpp @@ -155,7 +155,7 @@ unsigned int TileTextureInitData::getUniqueIdFromTextureFormat( case Format::DepthComponent: return 6; default: - ghoul_assert(false, "Unknown texture format"); + throw ghoul::MissingCaseException(); } } diff --git a/modules/imgui/src/guiparallelcomponent.cpp b/modules/imgui/src/guiparallelcomponent.cpp index 5f155f3471..25b21479cb 100644 --- a/modules/imgui/src/guiparallelcomponent.cpp +++ b/modules/imgui/src/guiparallelcomponent.cpp @@ -56,7 +56,6 @@ void GuiParallelComponent::renderDisconnected() { } void GuiParallelComponent::renderClientWithHost() { - ParallelConnection& parallel = OsEng.parallelConnection(); std::string connectionInfo = "Session hosted by \"" + parallel.hostName() + "\"\n"; diff --git a/modules/imgui/src/guipropertycomponent.cpp b/modules/imgui/src/guipropertycomponent.cpp index 1c57c0f24a..acdf57952e 100644 --- a/modules/imgui/src/guipropertycomponent.cpp +++ b/modules/imgui/src/guipropertycomponent.cpp @@ -105,7 +105,7 @@ namespace { std::vector(path.begin() + 1, path.end()), owner ); - }; + } void simplifyTree(TreeNode& node) { // Merging consecutive nodes if they only have a single child diff --git a/modules/imgui/src/guispacetimecomponent.cpp b/modules/imgui/src/guispacetimecomponent.cpp index 746e9118c4..0e23c7a945 100644 --- a/modules/imgui/src/guispacetimecomponent.cpp +++ b/modules/imgui/src/guispacetimecomponent.cpp @@ -175,10 +175,10 @@ void GuiSpaceTimeComponent::render() { double newTime = [days, j2000, seconds](){ if (days < 0) { - return static_cast(j2000 - seconds); + return j2000 - seconds; } else { - return static_cast(j2000 + seconds); + return j2000 + seconds; } }(); diff --git a/modules/touch/src/touchinteraction.cpp b/modules/touch/src/touchinteraction.cpp index 8a66aac409..bcda496340 100644 --- a/modules/touch/src/touchinteraction.cpp +++ b/modules/touch/src/touchinteraction.cpp @@ -56,9 +56,8 @@ #include -#pragma warning (pop) #ifdef WIN32 - +#pragma warning (pop) #endif // WIN32 @@ -222,19 +221,19 @@ TouchInteraction::TouchInteraction() , _pickingRadiusMinimum(PickingRadiusInfo, 0.1f, 0.f, 1.f) , _vel{ glm::dvec2(0.0), 0.0, 0.0, glm::dvec2(0.0) } , _sensitivity{ glm::dvec2(0.08, 0.045), 4.0, 2.75, glm::dvec2(0.08, 0.045) } - , _centroid(glm::dvec3(0.0)) // calculated with two vectors with known diff in length, then // projDiffLength/diffLength. , _projectionScaleFactor(1.000004) , _currentRadius(1.0) , _slerpdT(1000) - , _numOfTests(0) , _timeSlack(0.0) + , _numOfTests(0) , _directTouchMode(false) , _tap(false) , _doubleTap(false) , _lmSuccess(true) , _guiON(false) + , _centroid(glm::dvec3(0.0)) { addProperty(_touchActive); addProperty(_unitTest); diff --git a/src/network/parallelconnection.cpp b/src/network/parallelconnection.cpp index 38c5180af7..2dd3159e37 100644 --- a/src/network/parallelconnection.cpp +++ b/src/network/parallelconnection.cpp @@ -1235,8 +1235,7 @@ uint32_t ParallelConnection::hash(const std::string& val) { hashVal += (hashVal << 15); return hashVal; -}; - +} std::shared_ptr> ParallelConnection::connectionEvent() { return _connectionEvent; diff --git a/src/properties/matrix/dmat2property.cpp b/src/properties/matrix/dmat2property.cpp index 009afe1de4..b342547cf8 100644 --- a/src/properties/matrix/dmat2property.cpp +++ b/src/properties/matrix/dmat2property.cpp @@ -133,6 +133,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(DMat2Property, glm::dmat2x2, glm::dmat2x2(0), DEFAULT_TO_LUA_LAMBDA(glm::dmat2x2), DEFAULT_FROM_STRING_LAMBDA(glm::dmat2x2), DEFAULT_TO_STRING_LAMBDA(glm::dmat2x2), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/matrix/dmat2x3property.cpp b/src/properties/matrix/dmat2x3property.cpp index 8178e25617..95ea2ace90 100644 --- a/src/properties/matrix/dmat2x3property.cpp +++ b/src/properties/matrix/dmat2x3property.cpp @@ -137,6 +137,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(DMat2x3Property, glm::dmat2x3, glm::dmat2x3(0) DEFAULT_TO_LUA_LAMBDA(glm::dmat2x3), DEFAULT_FROM_STRING_LAMBDA(glm::dmat2x3), DEFAULT_TO_STRING_LAMBDA(glm::dmat2x3), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/matrix/dmat2x4property.cpp b/src/properties/matrix/dmat2x4property.cpp index 9706a1929c..3d65c79819 100644 --- a/src/properties/matrix/dmat2x4property.cpp +++ b/src/properties/matrix/dmat2x4property.cpp @@ -141,6 +141,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(DMat2x4Property, glm::dmat2x4, glm::dmat2x4(0) DEFAULT_TO_LUA_LAMBDA(glm::dmat2x4), DEFAULT_FROM_STRING_LAMBDA(glm::dmat2x4), DEFAULT_TO_STRING_LAMBDA(glm::dmat2x4), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/matrix/dmat3property.cpp b/src/properties/matrix/dmat3property.cpp index acdb6af091..adb7445b2e 100644 --- a/src/properties/matrix/dmat3property.cpp +++ b/src/properties/matrix/dmat3property.cpp @@ -144,6 +144,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(DMat3Property, glm::dmat3x3, glm::dmat3x3(0), DEFAULT_TO_LUA_LAMBDA(glm::dmat3x3), DEFAULT_FROM_STRING_LAMBDA(glm::dmat3x3), DEFAULT_TO_STRING_LAMBDA(glm::dmat3x3), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/matrix/dmat3x2property.cpp b/src/properties/matrix/dmat3x2property.cpp index 8ee35db37f..d5e4efb0f7 100644 --- a/src/properties/matrix/dmat3x2property.cpp +++ b/src/properties/matrix/dmat3x2property.cpp @@ -137,6 +137,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(DMat3x2Property, glm::dmat3x2, glm::dmat3x2(0) DEFAULT_TO_LUA_LAMBDA(glm::dmat3x2), DEFAULT_FROM_STRING_LAMBDA(glm::dmat3x2), DEFAULT_TO_STRING_LAMBDA(glm::dmat3x2), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/matrix/dmat3x4property.cpp b/src/properties/matrix/dmat3x4property.cpp index d0523030e5..dbb2e309c1 100644 --- a/src/properties/matrix/dmat3x4property.cpp +++ b/src/properties/matrix/dmat3x4property.cpp @@ -150,6 +150,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(DMat3x4Property, glm::dmat3x4, glm::dmat3x4(0) DEFAULT_TO_LUA_LAMBDA(glm::dmat3x4), DEFAULT_FROM_STRING_LAMBDA(glm::dmat3x4), DEFAULT_TO_STRING_LAMBDA(glm::dmat3x4), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/matrix/dmat4property.cpp b/src/properties/matrix/dmat4property.cpp index 283549e309..d24094ef55 100644 --- a/src/properties/matrix/dmat4property.cpp +++ b/src/properties/matrix/dmat4property.cpp @@ -159,6 +159,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(DMat4Property, glm::dmat4x4, glm::dmat4x4(0), DEFAULT_TO_LUA_LAMBDA(glm::dmat4x4), DEFAULT_FROM_STRING_LAMBDA(glm::dmat4x4), DEFAULT_TO_STRING_LAMBDA(glm::dmat4x4), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/matrix/dmat4x2property.cpp b/src/properties/matrix/dmat4x2property.cpp index 3a38fd9cf6..c7ac0bdbce 100644 --- a/src/properties/matrix/dmat4x2property.cpp +++ b/src/properties/matrix/dmat4x2property.cpp @@ -141,6 +141,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(DMat4x2Property, glm::dmat4x2, glm::dmat4x2(0) DEFAULT_TO_LUA_LAMBDA(glm::dmat4x2), DEFAULT_FROM_STRING_LAMBDA(glm::dmat4x2), DEFAULT_TO_STRING_LAMBDA(glm::dmat4x2), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/matrix/dmat4x3property.cpp b/src/properties/matrix/dmat4x3property.cpp index 7edc09ecdb..20cd44d31f 100644 --- a/src/properties/matrix/dmat4x3property.cpp +++ b/src/properties/matrix/dmat4x3property.cpp @@ -150,6 +150,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(DMat4x3Property, glm::dmat4x3, glm::dmat4x3(0) DEFAULT_TO_LUA_LAMBDA(glm::dmat4x3), DEFAULT_FROM_STRING_LAMBDA(glm::dmat4x3), DEFAULT_TO_STRING_LAMBDA(glm::dmat4x3), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/matrix/mat2property.cpp b/src/properties/matrix/mat2property.cpp index 78dc903062..90870a3acc 100644 --- a/src/properties/matrix/mat2property.cpp +++ b/src/properties/matrix/mat2property.cpp @@ -133,6 +133,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(Mat2Property, glm::mat2x2, glm::mat2x2(0), DEFAULT_TO_LUA_LAMBDA(glm::mat2x2), DEFAULT_FROM_STRING_LAMBDA(glm::mat2x2), DEFAULT_TO_STRING_LAMBDA(glm::mat2x2), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/matrix/mat2x3property.cpp b/src/properties/matrix/mat2x3property.cpp index 0d85aa1410..5c50c6f762 100644 --- a/src/properties/matrix/mat2x3property.cpp +++ b/src/properties/matrix/mat2x3property.cpp @@ -137,6 +137,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(Mat2x3Property, glm::mat2x3, glm::mat2x3(0), DEFAULT_TO_LUA_LAMBDA(glm::mat2x3), DEFAULT_FROM_STRING_LAMBDA(glm::mat2x3), DEFAULT_TO_STRING_LAMBDA(glm::mat2x3), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/matrix/mat2x4property.cpp b/src/properties/matrix/mat2x4property.cpp index 19a23e60f5..7732916f79 100644 --- a/src/properties/matrix/mat2x4property.cpp +++ b/src/properties/matrix/mat2x4property.cpp @@ -141,6 +141,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(Mat2x4Property, glm::mat2x4, glm::mat2x4(0), DEFAULT_TO_LUA_LAMBDA(glm::mat2x4), DEFAULT_FROM_STRING_LAMBDA(glm::mat2x4), DEFAULT_TO_STRING_LAMBDA(glm::mat2x4), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/matrix/mat3property.cpp b/src/properties/matrix/mat3property.cpp index 8c3a2a5d5b..9f29b6e17f 100644 --- a/src/properties/matrix/mat3property.cpp +++ b/src/properties/matrix/mat3property.cpp @@ -144,6 +144,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(Mat3Property, glm::mat3x3, glm::mat3x3(0), DEFAULT_TO_LUA_LAMBDA(glm::mat3x3), DEFAULT_FROM_STRING_LAMBDA(glm::mat3x3), DEFAULT_TO_STRING_LAMBDA(glm::mat3x3), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/matrix/mat3x2property.cpp b/src/properties/matrix/mat3x2property.cpp index 5e9d7599db..da77825b01 100644 --- a/src/properties/matrix/mat3x2property.cpp +++ b/src/properties/matrix/mat3x2property.cpp @@ -137,6 +137,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(Mat3x2Property, glm::mat3x2, glm::mat3x2(0), DEFAULT_TO_LUA_LAMBDA(glm::mat3x2), DEFAULT_FROM_STRING_LAMBDA(glm::mat3x2), DEFAULT_TO_STRING_LAMBDA(glm::mat3x2), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/matrix/mat3x4property.cpp b/src/properties/matrix/mat3x4property.cpp index 3412134a3c..75e5de60b9 100644 --- a/src/properties/matrix/mat3x4property.cpp +++ b/src/properties/matrix/mat3x4property.cpp @@ -150,6 +150,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(Mat3x4Property, glm::mat3x4, glm::mat3x4(0), DEFAULT_TO_LUA_LAMBDA(glm::mat3x4), DEFAULT_FROM_STRING_LAMBDA(glm::mat3x4), DEFAULT_TO_STRING_LAMBDA(glm::mat3x4), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/matrix/mat4property.cpp b/src/properties/matrix/mat4property.cpp index e0afddd0ea..f22df74bd3 100644 --- a/src/properties/matrix/mat4property.cpp +++ b/src/properties/matrix/mat4property.cpp @@ -159,6 +159,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(Mat4Property, glm::mat4x4, glm::mat4x4(0), DEFAULT_TO_LUA_LAMBDA(glm::mat4x4), DEFAULT_FROM_STRING_LAMBDA(glm::mat4x4), DEFAULT_TO_STRING_LAMBDA(glm::mat4x4), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/matrix/mat4x2property.cpp b/src/properties/matrix/mat4x2property.cpp index 7bc809a0ef..646a70d288 100644 --- a/src/properties/matrix/mat4x2property.cpp +++ b/src/properties/matrix/mat4x2property.cpp @@ -141,6 +141,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(Mat4x2Property, glm::mat4x2, glm::mat4x2(0), DEFAULT_TO_LUA_LAMBDA(glm::mat4x2), DEFAULT_FROM_STRING_LAMBDA(glm::mat4x2), DEFAULT_TO_STRING_LAMBDA(glm::mat4x2), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/matrix/mat4x3property.cpp b/src/properties/matrix/mat4x3property.cpp index 22dcac9bd4..4ecd920a22 100644 --- a/src/properties/matrix/mat4x3property.cpp +++ b/src/properties/matrix/mat4x3property.cpp @@ -150,6 +150,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(Mat4x3Property, glm::mat4x3, glm::mat4x3(0), DEFAULT_TO_LUA_LAMBDA(glm::mat4x3), DEFAULT_FROM_STRING_LAMBDA(glm::mat4x3), DEFAULT_TO_STRING_LAMBDA(glm::mat4x3), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/propertyowner.cpp b/src/properties/propertyowner.cpp index a43977c718..9b5b415ea9 100644 --- a/src/properties/propertyowner.cpp +++ b/src/properties/propertyowner.cpp @@ -149,7 +149,7 @@ void PropertyOwner::addProperty(Property* prop) { std::vector::const_iterator it = std::find_if( _properties.begin(), _properties.end(), - [id = prop->identifier()](Property* prop) { return prop->identifier() == id; } + [id = prop->identifier()](Property* p) { return p->identifier() == id; } ); // If we found the property identifier, we need to bail out @@ -184,7 +184,7 @@ void PropertyOwner::addPropertySubOwner(openspace::properties::PropertyOwner* ow std::vector::const_iterator it = std::find_if( _subOwners.begin(), _subOwners.end(), - [name = owner->name()](PropertyOwner* owner) { return owner->name() == name; } + [name = owner->name()](PropertyOwner* o) { return o->name() == name; } ); // If we found the propertyowner's name, we need to bail out @@ -218,7 +218,7 @@ void PropertyOwner::removeProperty(Property* prop) { std::vector::const_iterator it = std::find_if( _properties.begin(), _properties.end(), - [id = prop->identifier()](Property* prop) { return prop->identifier() == id; } + [id = prop->identifier()](Property* p) { return p->identifier() == id; } ); // If we found the property identifier, we can delete it @@ -242,7 +242,7 @@ void PropertyOwner::removePropertySubOwner(openspace::properties::PropertyOwner* std::vector::const_iterator it = std::find_if( _subOwners.begin(), _subOwners.end(), - [name = owner->name()](PropertyOwner* owner) { return owner->name() == name; } + [name = owner->name()](PropertyOwner* o) { return o->name() == name; } ); // If we found the propertyowner, we can delete it diff --git a/src/properties/scalar/boolproperty.cpp b/src/properties/scalar/boolproperty.cpp index dd594a7181..704c3cab57 100644 --- a/src/properties/scalar/boolproperty.cpp +++ b/src/properties/scalar/boolproperty.cpp @@ -62,6 +62,6 @@ REGISTER_TEMPLATEPROPERTY_SOURCE(BoolProperty, bool, false, return true; }, LUA_TBOOLEAN -); +) } // namespace openspace::properties diff --git a/src/properties/scalar/charproperty.cpp b/src/properties/scalar/charproperty.cpp index 6028165589..eedf67f61c 100644 --- a/src/properties/scalar/charproperty.cpp +++ b/src/properties/scalar/charproperty.cpp @@ -77,6 +77,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(CharProperty, char, char(0), DEFAULT_TO_LUA_LAMBDA(char), DEFAULT_FROM_STRING_LAMBDA(char, char(0)), DEFAULT_TO_STRING_LAMBDA(char), - LUA_TNUMBER); + LUA_TNUMBER) } // namespace openspace::properties diff --git a/src/properties/scalar/doubleproperty.cpp b/src/properties/scalar/doubleproperty.cpp index 601458f62f..344fef6262 100644 --- a/src/properties/scalar/doubleproperty.cpp +++ b/src/properties/scalar/doubleproperty.cpp @@ -77,6 +77,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(DoubleProperty, double, 0.0, DEFAULT_TO_LUA_LAMBDA(double), DEFAULT_FROM_STRING_LAMBDA(double, double(0)), DEFAULT_TO_STRING_LAMBDA(double), - LUA_TNUMBER); + LUA_TNUMBER) } // namespace openspace::properties diff --git a/src/properties/scalar/floatproperty.cpp b/src/properties/scalar/floatproperty.cpp index 74ed28362d..b24316f74a 100644 --- a/src/properties/scalar/floatproperty.cpp +++ b/src/properties/scalar/floatproperty.cpp @@ -77,6 +77,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(FloatProperty, float, 0.f, DEFAULT_TO_LUA_LAMBDA(float), DEFAULT_FROM_STRING_LAMBDA(float, float(0)), DEFAULT_TO_STRING_LAMBDA(float), - LUA_TNUMBER); + LUA_TNUMBER) } // namespace openspace::properties diff --git a/src/properties/scalar/intproperty.cpp b/src/properties/scalar/intproperty.cpp index 73bee46f2b..18bd6a23fe 100644 --- a/src/properties/scalar/intproperty.cpp +++ b/src/properties/scalar/intproperty.cpp @@ -76,6 +76,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(IntProperty, int, int(0), numeric_limits: DEFAULT_TO_LUA_LAMBDA(int), DEFAULT_FROM_STRING_LAMBDA(int, int(0)), DEFAULT_TO_STRING_LAMBDA(int), - LUA_TNUMBER); + LUA_TNUMBER) } // namespace openspace::properties diff --git a/src/properties/scalar/longdoubleproperty.cpp b/src/properties/scalar/longdoubleproperty.cpp index eee5554953..db0e00ffb4 100644 --- a/src/properties/scalar/longdoubleproperty.cpp +++ b/src/properties/scalar/longdoubleproperty.cpp @@ -77,6 +77,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(LongDoubleProperty, long double, 0l, DEFAULT_TO_LUA_LAMBDA(long double), DEFAULT_FROM_STRING_LAMBDA(long double, 0l), DEFAULT_TO_STRING_LAMBDA(long double), - LUA_TNUMBER); + LUA_TNUMBER) } // namespace openspace::properties diff --git a/src/properties/scalar/longlongproperty.cpp b/src/properties/scalar/longlongproperty.cpp index 3cda8498b4..73868f82a5 100644 --- a/src/properties/scalar/longlongproperty.cpp +++ b/src/properties/scalar/longlongproperty.cpp @@ -77,6 +77,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(LongLongProperty, long long, 0, DEFAULT_TO_LUA_LAMBDA(long long), DEFAULT_FROM_STRING_LAMBDA(long long, 0), DEFAULT_TO_STRING_LAMBDA(long long), - LUA_TNUMBER); + LUA_TNUMBER) } // namespace openspace::properties diff --git a/src/properties/scalar/longproperty.cpp b/src/properties/scalar/longproperty.cpp index e439db0c3a..2b44591b86 100644 --- a/src/properties/scalar/longproperty.cpp +++ b/src/properties/scalar/longproperty.cpp @@ -77,6 +77,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(LongProperty, long, long(0), DEFAULT_TO_LUA_LAMBDA(long), DEFAULT_FROM_STRING_LAMBDA(long, long(0)), DEFAULT_TO_STRING_LAMBDA(long), - LUA_TNUMBER); + LUA_TNUMBER) } // namespace openspace::properties diff --git a/src/properties/scalar/shortproperty.cpp b/src/properties/scalar/shortproperty.cpp index c0e72ce46e..066b1dfb25 100644 --- a/src/properties/scalar/shortproperty.cpp +++ b/src/properties/scalar/shortproperty.cpp @@ -77,6 +77,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(ShortProperty, short, short(0), DEFAULT_TO_LUA_LAMBDA(short), DEFAULT_FROM_STRING_LAMBDA(short, short(0)), DEFAULT_TO_STRING_LAMBDA(short), - LUA_TNUMBER); + LUA_TNUMBER) } // namespace openspace::properties diff --git a/src/properties/scalar/signedcharproperty.cpp b/src/properties/scalar/signedcharproperty.cpp index fa64500dc9..31d7aed864 100644 --- a/src/properties/scalar/signedcharproperty.cpp +++ b/src/properties/scalar/signedcharproperty.cpp @@ -77,6 +77,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(SignedCharProperty, signed char, 0, DEFAULT_TO_LUA_LAMBDA(signed char), DEFAULT_FROM_STRING_LAMBDA(signed char, 0), DEFAULT_TO_STRING_LAMBDA(signed char), - LUA_TNUMBER); + LUA_TNUMBER) } // namespace openspace::properties diff --git a/src/properties/scalar/ucharproperty.cpp b/src/properties/scalar/ucharproperty.cpp index 7d9c25f501..59634c950b 100644 --- a/src/properties/scalar/ucharproperty.cpp +++ b/src/properties/scalar/ucharproperty.cpp @@ -77,6 +77,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(UCharProperty, unsigned char, 0, DEFAULT_TO_LUA_LAMBDA(unsigned char), DEFAULT_FROM_STRING_LAMBDA(unsigned char, 0), DEFAULT_TO_STRING_LAMBDA(unsigned char), - LUA_TNUMBER); + LUA_TNUMBER) } // namespace openspace::properties diff --git a/src/properties/scalar/uintproperty.cpp b/src/properties/scalar/uintproperty.cpp index d620050fad..3f5786177b 100644 --- a/src/properties/scalar/uintproperty.cpp +++ b/src/properties/scalar/uintproperty.cpp @@ -77,6 +77,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(UCharProperty, unsigned int, 0, DEFAULT_TO_LUA_LAMBDA(unsigned int), DEFAULT_FROM_STRING_LAMBDA(unsigned int, 0), DEFAULT_TO_STRING_LAMBDA(unsigned int), - LUA_TNUMBER); + LUA_TNUMBER) } // namespace openspace::properties diff --git a/src/properties/scalar/ulonglongproperty.cpp b/src/properties/scalar/ulonglongproperty.cpp index 04f866d41f..1ab97b704a 100644 --- a/src/properties/scalar/ulonglongproperty.cpp +++ b/src/properties/scalar/ulonglongproperty.cpp @@ -77,6 +77,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(ULongLongProperty, unsigned long long, 1ull, DEFAULT_TO_LUA_LAMBDA(unsigned long long), DEFAULT_FROM_STRING_LAMBDA(unsigned long long, 0ull), DEFAULT_TO_STRING_LAMBDA(unsigned long long), - LUA_TNUMBER); + LUA_TNUMBER) } // namespace openspace::properties diff --git a/src/properties/scalar/ulongproperty.cpp b/src/properties/scalar/ulongproperty.cpp index 8631f663da..47333a58e8 100644 --- a/src/properties/scalar/ulongproperty.cpp +++ b/src/properties/scalar/ulongproperty.cpp @@ -77,6 +77,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(ULongProperty, unsigned long, 0ul, DEFAULT_TO_LUA_LAMBDA(unsigned long), DEFAULT_FROM_STRING_LAMBDA(unsigned long, 0ul), DEFAULT_TO_STRING_LAMBDA(unsigned long), - LUA_TNUMBER); + LUA_TNUMBER) } // namespace openspace::properties diff --git a/src/properties/scalar/ushortproperty.cpp b/src/properties/scalar/ushortproperty.cpp index 2cda3df0f5..51adf2f061 100644 --- a/src/properties/scalar/ushortproperty.cpp +++ b/src/properties/scalar/ushortproperty.cpp @@ -77,6 +77,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(UShortProperty, unsigned short, 0, DEFAULT_TO_LUA_LAMBDA(unsigned short), DEFAULT_FROM_STRING_LAMBDA(unsigned short, 0), DEFAULT_TO_STRING_LAMBDA(unsigned short), - LUA_TNUMBER); + LUA_TNUMBER) } // namespace openspace::properties diff --git a/src/properties/stringproperty.cpp b/src/properties/stringproperty.cpp index f68587da01..7278352ef8 100644 --- a/src/properties/stringproperty.cpp +++ b/src/properties/stringproperty.cpp @@ -28,8 +28,11 @@ namespace openspace::properties { -REGISTER_TEMPLATEPROPERTY_SOURCE(StringProperty, std::string, "", -[](lua_State* state, bool& success) -> std::string { +REGISTER_TEMPLATEPROPERTY_SOURCE( + StringProperty, + std::string, + "", + [](lua_State* state, bool& success) -> std::string { success = lua_isstring(state, -1) == 1; if (success) { return lua_tostring(state, -1); @@ -38,27 +41,27 @@ REGISTER_TEMPLATEPROPERTY_SOURCE(StringProperty, std::string, "", return ""; } }, -[](lua_State* state, std::string value) -> bool { + [](lua_State* state, std::string value) -> bool { lua_pushstring(state, value.c_str()); return true; }, -[](std::string value, bool& success) -> std::string { - // An incoming string is of the form - // "value" - // so we want to remove the leading and trailing " characters - if (value.size() > 2 && (value[0] == '"' && value[value.size() - 1] == '"')) { - // Removing the first and last " - success = true; - return value.substr(1, value.size() - 2); - } - success = false; - return value; -}, -[](std::string& outValue, std::string inValue) -> bool { - outValue = "\"" + inValue + "\""; - return true; -}, -LUA_TSTRING -); + [](std::string value, bool& success) -> std::string { + // An incoming string is of the form + // "value" + // so we want to remove the leading and trailing " characters + if (value.size() > 2 && (value[0] == '"' && value[value.size() - 1] == '"')) { + // Removing the first and last " + success = true; + return value.substr(1, value.size() - 2); + } + success = false; + return value; + }, + [](std::string& outValue, std::string inValue) -> bool { + outValue = "\"" + inValue + "\""; + return true; + }, + LUA_TSTRING +) } // namespace openspace::properties diff --git a/src/properties/vector/bvec2property.cpp b/src/properties/vector/bvec2property.cpp index 4371ba08f0..d82d8aea2a 100644 --- a/src/properties/vector/bvec2property.cpp +++ b/src/properties/vector/bvec2property.cpp @@ -110,6 +110,6 @@ REGISTER_TEMPLATEPROPERTY_SOURCE(BVec2Property, glm::bvec2, glm::bvec2(false), DEFAULT_TO_LUA_LAMBDA(glm::bvec2), DEFAULT_FROM_STRING_LAMBDA(glm::bvec2), DEFAULT_TO_STRING_LAMBDA(glm::bvec2), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/vector/bvec3property.cpp b/src/properties/vector/bvec3property.cpp index b23f2c9acf..8260366516 100644 --- a/src/properties/vector/bvec3property.cpp +++ b/src/properties/vector/bvec3property.cpp @@ -110,6 +110,6 @@ REGISTER_TEMPLATEPROPERTY_SOURCE(BVec3Property, glm::bvec3, glm::bvec3(false), DEFAULT_TO_LUA_LAMBDA(glm::bvec3), DEFAULT_FROM_STRING_LAMBDA(glm::bvec3), DEFAULT_TO_STRING_LAMBDA(glm::bvec3), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/vector/bvec4property.cpp b/src/properties/vector/bvec4property.cpp index 1f4860fa4a..1524d73a7e 100644 --- a/src/properties/vector/bvec4property.cpp +++ b/src/properties/vector/bvec4property.cpp @@ -110,6 +110,6 @@ REGISTER_TEMPLATEPROPERTY_SOURCE(BVec4Property, glm::bvec4, glm::bvec4(false), DEFAULT_TO_LUA_LAMBDA(glm::bvec4), DEFAULT_FROM_STRING_LAMBDA(glm::bvec4), DEFAULT_TO_STRING_LAMBDA(glm::bvec4), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/vector/dvec2property.cpp b/src/properties/vector/dvec2property.cpp index cee97b4d10..a09f08bf62 100644 --- a/src/properties/vector/dvec2property.cpp +++ b/src/properties/vector/dvec2property.cpp @@ -112,6 +112,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(DVec2Property, glm::dvec2, glm::dvec2(0), DEFAULT_TO_LUA_LAMBDA(glm::dvec2), DEFAULT_FROM_STRING_LAMBDA(glm::dvec2), DEFAULT_TO_STRING_LAMBDA(glm::dvec2), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/vector/dvec3property.cpp b/src/properties/vector/dvec3property.cpp index cf55ddee75..39876748dc 100644 --- a/src/properties/vector/dvec3property.cpp +++ b/src/properties/vector/dvec3property.cpp @@ -112,6 +112,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(DVec3Property, glm::dvec3, glm::dvec3(0), DEFAULT_TO_LUA_LAMBDA(glm::dvec3), DEFAULT_FROM_STRING_LAMBDA(glm::dvec3), DEFAULT_TO_STRING_LAMBDA(glm::dvec3), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/vector/dvec4property.cpp b/src/properties/vector/dvec4property.cpp index adc3d789ad..fe1223dc2e 100644 --- a/src/properties/vector/dvec4property.cpp +++ b/src/properties/vector/dvec4property.cpp @@ -112,6 +112,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(DVec4Property, glm::dvec4, glm::dvec4(0), DEFAULT_TO_LUA_LAMBDA(glm::dvec4), DEFAULT_FROM_STRING_LAMBDA(glm::dvec4), DEFAULT_TO_STRING_LAMBDA(glm::dvec4), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/vector/ivec2property.cpp b/src/properties/vector/ivec2property.cpp index 8e1163f174..b18f153efe 100644 --- a/src/properties/vector/ivec2property.cpp +++ b/src/properties/vector/ivec2property.cpp @@ -111,6 +111,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(IVec2Property, glm::ivec2, glm::ivec2(0), DEFAULT_TO_LUA_LAMBDA(glm::ivec2), DEFAULT_FROM_STRING_LAMBDA(glm::ivec2), DEFAULT_TO_STRING_LAMBDA(glm::ivec2), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/vector/ivec3property.cpp b/src/properties/vector/ivec3property.cpp index cf00fc34f5..7b7441cb23 100644 --- a/src/properties/vector/ivec3property.cpp +++ b/src/properties/vector/ivec3property.cpp @@ -111,6 +111,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(IVec3Property, glm::ivec3, glm::ivec3(0), DEFAULT_TO_LUA_LAMBDA(glm::ivec3), DEFAULT_FROM_STRING_LAMBDA(glm::ivec3), DEFAULT_TO_STRING_LAMBDA(glm::ivec3), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/vector/ivec4property.cpp b/src/properties/vector/ivec4property.cpp index cb801cc01d..7321ae23fa 100644 --- a/src/properties/vector/ivec4property.cpp +++ b/src/properties/vector/ivec4property.cpp @@ -111,6 +111,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(IVec4Property, glm::ivec4, glm::ivec4(0), DEFAULT_TO_LUA_LAMBDA(glm::ivec4), DEFAULT_FROM_STRING_LAMBDA(glm::ivec4), DEFAULT_TO_STRING_LAMBDA(glm::ivec4), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/vector/uvec2property.cpp b/src/properties/vector/uvec2property.cpp index ecccd4014f..ace65b8a17 100644 --- a/src/properties/vector/uvec2property.cpp +++ b/src/properties/vector/uvec2property.cpp @@ -112,6 +112,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(UVec2Property, glm::uvec2, glm::uvec2(0), DEFAULT_TO_LUA_LAMBDA(glm::uvec2), DEFAULT_FROM_STRING_LAMBDA(glm::uvec2), DEFAULT_TO_STRING_LAMBDA(glm::uvec2), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/vector/uvec3property.cpp b/src/properties/vector/uvec3property.cpp index 3c3e5375af..6976411872 100644 --- a/src/properties/vector/uvec3property.cpp +++ b/src/properties/vector/uvec3property.cpp @@ -112,6 +112,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(UVec3Property, glm::uvec3, glm::uvec3(0), DEFAULT_TO_LUA_LAMBDA(glm::uvec3), DEFAULT_FROM_STRING_LAMBDA(glm::uvec3), DEFAULT_TO_STRING_LAMBDA(glm::uvec3), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/vector/uvec4property.cpp b/src/properties/vector/uvec4property.cpp index 7f442c5d13..39daf78a01 100644 --- a/src/properties/vector/uvec4property.cpp +++ b/src/properties/vector/uvec4property.cpp @@ -112,6 +112,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(UVec4Property, glm::uvec4, glm::uvec4(0), DEFAULT_TO_LUA_LAMBDA(glm::uvec4), DEFAULT_FROM_STRING_LAMBDA(glm::uvec4), DEFAULT_TO_STRING_LAMBDA(glm::uvec4), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/vector/vec2property.cpp b/src/properties/vector/vec2property.cpp index ccc8115151..9c4f176d87 100644 --- a/src/properties/vector/vec2property.cpp +++ b/src/properties/vector/vec2property.cpp @@ -112,6 +112,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(Vec2Property, glm::vec2, glm::vec2(0), DEFAULT_TO_LUA_LAMBDA(glm::vec2), DEFAULT_FROM_STRING_LAMBDA(glm::vec2), DEFAULT_TO_STRING_LAMBDA(glm::vec2), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/vector/vec3property.cpp b/src/properties/vector/vec3property.cpp index 1898796bf0..a9a7e91a59 100644 --- a/src/properties/vector/vec3property.cpp +++ b/src/properties/vector/vec3property.cpp @@ -112,6 +112,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(Vec3Property, glm::vec3, glm::vec3(0), DEFAULT_TO_LUA_LAMBDA(glm::vec3), DEFAULT_FROM_STRING_LAMBDA(glm::vec3), DEFAULT_TO_STRING_LAMBDA(glm::vec3), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/properties/vector/vec4property.cpp b/src/properties/vector/vec4property.cpp index 57e15639f5..7e06bab9fc 100644 --- a/src/properties/vector/vec4property.cpp +++ b/src/properties/vector/vec4property.cpp @@ -112,6 +112,6 @@ REGISTER_NUMERICALPROPERTY_SOURCE(Vec4Property, glm::vec4, glm::vec4(0), DEFAULT_TO_LUA_LAMBDA(glm::vec4), DEFAULT_FROM_STRING_LAMBDA(glm::vec4), DEFAULT_TO_STRING_LAMBDA(glm::vec4), - LUA_TTABLE); + LUA_TTABLE) } // namespace openspace::properties diff --git a/src/rendering/loadingscreen.cpp b/src/rendering/loadingscreen.cpp index b2cfd13c40..cf4fb8aed0 100644 --- a/src/rendering/loadingscreen.cpp +++ b/src/rendering/loadingscreen.cpp @@ -112,10 +112,6 @@ LoadingScreen::LoadingScreen(ShowMessage showMessage, ShowNodeNames showNodeName , _progressbar{ 0, 0, 0, 0 } , _randomEngine(_randomDevice()) { - const glm::vec2 dpiScaling = OsEng.windowWrapper().dpiScaling(); - const glm::ivec2 res = - glm::vec2(OsEng.windowWrapper().currentWindowResolution()) / dpiScaling; - _program = ghoul::opengl::ProgramObject::Build( "Loading Screen", "${SHADERS}/loadingscreen.vert", diff --git a/src/util/progressbar.cpp b/src/util/progressbar.cpp index 6d9859cd36..a3edba9096 100644 --- a/src/util/progressbar.cpp +++ b/src/util/progressbar.cpp @@ -54,6 +54,6 @@ void ProgressBar::print(int current) { << std::flush; } _previous = iprogress; -}; +} } // namespace openspace diff --git a/src/util/threadpool.cpp b/src/util/threadpool.cpp index afc061740c..c2b52979a9 100644 --- a/src/util/threadpool.cpp +++ b/src/util/threadpool.cpp @@ -26,7 +26,9 @@ namespace openspace { -Worker::Worker(ThreadPool& pool) : pool(pool) {} +Worker::Worker(ThreadPool& pool_) + : pool(pool_) +{} void Worker::operator()() { std::function task;