mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-21 20:39:08 -06:00
Remove warnings
Update SGCT repository Update Ghoul repository
This commit is contained in:
Submodule ext/ghoul updated: c1daefdce9...1fc3d1f78d
2
ext/sgct
2
ext/sgct
Submodule ext/sgct updated: f1c7ddb602...ac291882d9
@@ -246,6 +246,7 @@ template <typename T>
|
||||
NumericalProperty<T>::NumericalProperty(PropertyInfo info, T value)
|
||||
: NumericalProperty<T>(
|
||||
std::move(info),
|
||||
std::move(value),
|
||||
PropertyDelegate<NumericalProperty<T>>::template defaultMinimumValue<T>(),
|
||||
PropertyDelegate<NumericalProperty<T>>::template defaultMaximumValue<T>(),
|
||||
PropertyDelegate<NumericalProperty<T>>::template defaultSteppingValue<T>()
|
||||
|
||||
@@ -114,7 +114,7 @@ RenderablePlane::RenderablePlane(const ghoul::Dictionary& dictionary)
|
||||
: Renderable(dictionary)
|
||||
, _texturePath(TextureInfo)
|
||||
, _billboard(BillboardInfo, false)
|
||||
, _size(SizeInfo, 10.f, 0.f, 1e25)
|
||||
, _size(SizeInfo, 10.f, 0.f, 1e25f)
|
||||
, _blendMode(BlendModeInfo, properties::OptionProperty::DisplayType::Dropdown)
|
||||
, _shader(nullptr)
|
||||
, _texture(nullptr)
|
||||
|
||||
@@ -128,7 +128,7 @@ RenderableSphere::RenderableSphere(const ghoul::Dictionary& dictionary)
|
||||
: Renderable(dictionary)
|
||||
, _texturePath(TextureInfo)
|
||||
, _orientation(OrientationInfo, properties::OptionProperty::DisplayType::Dropdown)
|
||||
, _size(SizeInfo, 1.f, 0.f, 1e35)
|
||||
, _size(SizeInfo, 1.f, 0.f, 1e35f)
|
||||
, _segments(SegmentsInfo, 8, 4, 1000)
|
||||
, _transparency(TransparencyInfo, 1.f, 0.f, 1.f)
|
||||
, _shader(nullptr)
|
||||
@@ -187,7 +187,9 @@ RenderableSphere::RenderableSphere(const ghoul::Dictionary& dictionary)
|
||||
}
|
||||
});
|
||||
if (dictionary.hasKey(TransparencyInfo.identifier)) {
|
||||
_transparency = dictionary.value<double>(TransparencyInfo.identifier);
|
||||
_transparency = static_cast<float>(
|
||||
dictionary.value<double>(TransparencyInfo.identifier)
|
||||
);
|
||||
}
|
||||
addProperty(_transparency);
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ documentation::Documentation RenderableTrailOrbit::Documentation() {
|
||||
RenderableTrailOrbit::RenderableTrailOrbit(const ghoul::Dictionary& dictionary)
|
||||
: RenderableTrail(dictionary)
|
||||
, _period(PeriodInfo, 0.0, 0.0, 1e9)
|
||||
, _resolution(ResolutionInfo, 1e4, 1, 1e6)
|
||||
, _resolution(ResolutionInfo, 10000, 1, 1000000)
|
||||
, _needsFullSweep(true)
|
||||
, _indexBufferDirty(true)
|
||||
, _previousTime(0)
|
||||
|
||||
@@ -145,7 +145,7 @@ RenderableTrailTrajectory::RenderableTrailTrajectory(const ghoul::Dictionary& di
|
||||
, _startTime(StartTimeInfo)
|
||||
, _endTime(EndTimeInfo)
|
||||
, _sampleInterval(SampleIntervalInfo, 2.0, 2.0, 1e6)
|
||||
, _timeStampSubsamplingFactor(TimeSubSampleInfo, 1, 1, 1e9)
|
||||
, _timeStampSubsamplingFactor(TimeSubSampleInfo, 1, 1, 1000000000)
|
||||
, _renderFullTrail(RenderFullPathInfo, false)
|
||||
, _needsFullSweep(true)
|
||||
, _subsamplingIsDirty(true)
|
||||
|
||||
@@ -169,7 +169,8 @@ void MemoryAwareTileCache::setSizeEstimated(size_t estimatedSize) {
|
||||
|
||||
size_t sumTextureTypeSize = std::accumulate(
|
||||
_textureContainerMap.cbegin(),
|
||||
_textureContainerMap.cend(), 0,
|
||||
_textureContainerMap.cend(),
|
||||
size_t(0),
|
||||
[](size_t s, const std::pair<const TileTextureInitData::HashKey,
|
||||
TextureContainerTileCache>& p)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@ void* PixelBufferContainer<KeyType>::mapBuffer(KeyType key, PixelBuffer::Access
|
||||
_pixelBuffers[i]->unbind();
|
||||
if (dataPtr) { // Success in mapping
|
||||
// Add this index to the map of mapped pixel buffers
|
||||
_indexMap.emplace(key, i);
|
||||
_indexMap.emplace(key, static_cast<int>(i));
|
||||
return dataPtr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ void GPULayerRenderSettings::setValue(ghoul::opengl::ProgramObject* programObjec
|
||||
gpuOffset.setValue(programObject, layerSettings.offset.value());
|
||||
}
|
||||
|
||||
void GPULayerRenderSettings::bind(const LayerRenderSettings& layerSettings,
|
||||
void GPULayerRenderSettings::bind(const LayerRenderSettings&,
|
||||
ghoul::opengl::ProgramObject* programObject,
|
||||
const std::string& nameBase)
|
||||
{
|
||||
|
||||
@@ -98,7 +98,6 @@ void LayerRenderSettings::setValuesFromDictionary(
|
||||
float dictGamma;
|
||||
float dictMultiplier;
|
||||
float dictOffset;
|
||||
float dictValueBlending;
|
||||
|
||||
if (renderSettingsDict.getValue(keyOpacity, dictOpacity)) {
|
||||
opacity = dictOpacity;
|
||||
|
||||
@@ -42,7 +42,11 @@ RawTile RawTile::createDefault(const TileTextureInitData& initData) {
|
||||
RawTile defaultRes;
|
||||
defaultRes.textureInitData = std::make_shared<TileTextureInitData>(initData);
|
||||
defaultRes.imageData = new char[initData.totalNumBytes()];
|
||||
std::fill_n(static_cast<char*>(defaultRes.imageData), initData.totalNumBytes(), 0);
|
||||
std::fill_n(
|
||||
static_cast<char*>(defaultRes.imageData),
|
||||
initData.totalNumBytes(),
|
||||
char(0)
|
||||
);
|
||||
return defaultRes;
|
||||
|
||||
}
|
||||
|
||||
@@ -33,8 +33,18 @@
|
||||
#include <ghoul/ghoul.h>
|
||||
#include <ghoul/logging/consolelog.h>
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable : 4251) // needs to have dll-interface to be used by clients
|
||||
#endif // WIN32
|
||||
|
||||
#include <gdal_priv.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#pragma warning (pop)
|
||||
#endif // WIN32
|
||||
|
||||
namespace {
|
||||
const char* _loggerCat = "GdalWrapper";
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ DefaultTileProvider::DefaultTileProvider(const ghoul::Dictionary& dictionary)
|
||||
int tilePixelSize = 0;
|
||||
if (dictionary.getValue<double>(KeyTilePixelSize, pixelSize)) {
|
||||
LDEBUG("Default pixel size overridden: " << pixelSize);
|
||||
tilePixelSize = pixelSize;
|
||||
tilePixelSize = static_cast<int>(pixelSize);
|
||||
}
|
||||
TileTextureInitData initData(LayerManager::getTileTextureInitData(
|
||||
_layerGroupID, tilePixelSize));
|
||||
|
||||
@@ -71,7 +71,9 @@ void SizeReferenceTileProvider::renderText(const ghoul::fontrendering::FontRende
|
||||
|
||||
glm::vec2 textPosition;
|
||||
textPosition.x = 0;
|
||||
textPosition.y = aboveEquator ? _fontSize / 2 : _initData.dimensionsWithPadding().y - 3 * _fontSize / 2;
|
||||
textPosition.y = aboveEquator ?
|
||||
_fontSize / 2.f :
|
||||
_initData.dimensionsWithPadding().y - 3.f * _fontSize / 2.f;
|
||||
glm::vec4 color(1.0, 1.0, 1.0, 1.0);
|
||||
|
||||
fontRenderer.render(
|
||||
@@ -80,7 +82,7 @@ void SizeReferenceTileProvider::renderText(const ghoul::fontrendering::FontRende
|
||||
color,
|
||||
" %.0f %s",
|
||||
tileLongitudalLength, unit.c_str()
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
int SizeReferenceTileProvider::roundedLongitudalLength(const TileIndex& tileIndex) const {
|
||||
@@ -95,7 +97,7 @@ int SizeReferenceTileProvider::roundedLongitudalLength(const TileIndex& tileInde
|
||||
if (useKm) {
|
||||
l /= 1000;
|
||||
}
|
||||
l = std::round(l);
|
||||
l = static_cast<int>(std::round(l));
|
||||
if (useKm) {
|
||||
l *= 1000;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ TemporalTileProvider::TemporalTileProvider(const ghoul::Dictionary& dictionary)
|
||||
try {
|
||||
filePath = absPath(filePath);
|
||||
}
|
||||
catch (const std::runtime_error& e) {
|
||||
catch (const std::runtime_error&) {
|
||||
// File path was not a path to a file but a GDAL config or empty
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ bool TemporalTileProvider::readFilePath() {
|
||||
ghoul::filesystem::File(_filePath.value()).directoryName()
|
||||
);
|
||||
}
|
||||
catch (const std::runtime_error& e) {
|
||||
catch (const std::runtime_error&) {
|
||||
// File path was not a path to a file but a GDAL config or empty
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ TextTileProvider::TextTileProvider(const TileTextureInitData& initData, size_t f
|
||||
, _fontSize(fontSize)
|
||||
{
|
||||
_tileCache = OsEng.moduleEngine().module<GlobeBrowsingModule>()->tileCache();
|
||||
_font = OsEng.fontManager().font("Mono", _fontSize);
|
||||
_font = OsEng.fontManager().font("Mono", static_cast<float>(_fontSize));
|
||||
|
||||
_fontRenderer = std::unique_ptr<FontRenderer>(FontRenderer::createDefault());
|
||||
_fontRenderer->setFramebufferSize(_initData.dimensionsWithPadding());
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
namespace openspace::globebrowsing::tileprovider {
|
||||
|
||||
TileIndexTileProvider::TileIndexTileProvider(const ghoul::Dictionary& dict)
|
||||
TileIndexTileProvider::TileIndexTileProvider(const ghoul::Dictionary&)
|
||||
: TextTileProvider(LayerManager::getTileTextureInitData(
|
||||
layergroupid::GroupID::ColorLayers
|
||||
))
|
||||
|
||||
@@ -28,6 +28,11 @@
|
||||
#include <ghoul/logging/logmanager.h>
|
||||
#include <ghoul/filesystem/filesystem.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable : 4619) // #pragma warning: there is no warning number '4675'
|
||||
#endif // WIN32
|
||||
|
||||
#include <ccmc/Kameleon.h>
|
||||
#include <ccmc/Model.h>
|
||||
#include <ccmc/Interpolator.h>
|
||||
@@ -35,6 +40,10 @@
|
||||
#include <ccmc/ENLIL.h>
|
||||
#include <ccmc/CCMCTime.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#pragma warning (pop)
|
||||
#endif // WIN32
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <math.h>
|
||||
#include <cstdio>
|
||||
@@ -940,9 +949,24 @@ void KameleonWrapper::getGridVariables(std::string& x, std::string& y, std::stri
|
||||
y = tokens.at(1);
|
||||
z = tokens.at(2);
|
||||
|
||||
std::transform(x.begin(), x.end(), x.begin(), ::tolower);
|
||||
std::transform(y.begin(), y.end(), y.begin(), ::tolower);
|
||||
std::transform(z.begin(), z.end(), z.begin(), ::tolower);
|
||||
std::transform(
|
||||
x.begin(),
|
||||
x.end(),
|
||||
x.begin(),
|
||||
[](char c) { return static_cast<char>(tolower(c)); }
|
||||
);
|
||||
std::transform(
|
||||
y.begin(),
|
||||
y.end(),
|
||||
y.begin(),
|
||||
[](char c) { return static_cast<char>(tolower(c)); }
|
||||
);
|
||||
std::transform(
|
||||
z.begin(),
|
||||
z.end(),
|
||||
z.begin(),
|
||||
[](char c) { return static_cast<char>(tolower(c)); }
|
||||
);
|
||||
}
|
||||
|
||||
KameleonWrapper::GridType KameleonWrapper::getGridType(
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
|
||||
#ifdef WIN32
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable : 4345) // #pragma warning: there is no warning number '4345'
|
||||
#pragma warning (disable : 4619) // #pragma warning: there is no warning number '4619'
|
||||
#pragma warning (disable : 4675) // #pragma warning: there is no warning number '4675'
|
||||
#pragma warning (disable : 4800) // #pragma warning: there is no warning number '4800'
|
||||
|
||||
@@ -139,7 +139,7 @@ RenderableModelProjection::RenderableModelProjection(const ghoul::Dictionary& di
|
||||
);
|
||||
|
||||
std::string name;
|
||||
[[maybe_unused]] bool success = dictionary.getValue(SceneGraphNode::KeyName, name);
|
||||
[[ maybe_unused ]] bool success = dictionary.getValue(SceneGraphNode::KeyName, name);
|
||||
ghoul_assert(success, "Name was not passed to RenderableModelProjection");
|
||||
|
||||
using ghoul::Dictionary;
|
||||
|
||||
@@ -128,7 +128,7 @@ documentation::Documentation RenderableRings::Documentation() {
|
||||
RenderableRings::RenderableRings(const ghoul::Dictionary& dictionary)
|
||||
: Renderable(dictionary)
|
||||
, _texturePath(TextureInfo)
|
||||
, _size(SizeInfo, 1.f, 0.f, 1e25)
|
||||
, _size(SizeInfo, 1.f, 0.f, 1e25f)
|
||||
, _offset(OffsetInfo, glm::vec2(0.f, 1.f), glm::vec2(0.f), glm::vec2(1.f))
|
||||
, _nightFactor(NightFactorInfo, 0.33f, 0.f, 1.f)
|
||||
, _transparency(TransparencyInfo, 0.15f, 0.f, 1.f)
|
||||
|
||||
@@ -212,10 +212,14 @@ RenderableStars::RenderableStars(const ghoul::Dictionary& dictionary)
|
||||
"RenderableStars"
|
||||
);
|
||||
|
||||
_pointSpreadFunctionTexturePath = absPath(dictionary.value<std::string>(KeyTexture));
|
||||
_pointSpreadFunctionTexturePath = absPath(dictionary.value<std::string>(
|
||||
PsfTextureInfo.identifier
|
||||
));
|
||||
_pointSpreadFunctionFile = std::make_unique<File>(_pointSpreadFunctionTexturePath);
|
||||
|
||||
_colorTexturePath = absPath(dictionary.value<std::string>(KeyColorMap));
|
||||
_colorTexturePath = absPath(dictionary.value<std::string>(
|
||||
ColorTextureInfo.identifier
|
||||
));
|
||||
_colorTextureFile = std::make_unique<File>(_colorTexturePath);
|
||||
|
||||
_speckFile = absPath(dictionary.value<std::string>(KeyFile));
|
||||
|
||||
@@ -91,7 +91,6 @@ SimpleSphereGeometry::SimpleSphereGeometry(const ghoul::Dictionary& dictionary)
|
||||
"SimpleSphereGeometry"
|
||||
);
|
||||
|
||||
float sphereRadius = 0.f;
|
||||
glm::vec3 ellipsoidRadius;
|
||||
if (dictionary.hasKeyAndValue<double>(RadiusInfo.identifier)) {
|
||||
const float r = static_cast<float>(
|
||||
|
||||
@@ -53,3 +53,5 @@ create_new_module(
|
||||
)
|
||||
|
||||
include_external_library(${touch_module} libTUIO11 ${CMAKE_CURRENT_SOURCE_DIR}/ext)
|
||||
|
||||
disable_external_warnings_for_file(${CMAKE_CURRENT_SOURCE_DIR}/ext/levmarq.cpp)
|
||||
|
||||
@@ -36,7 +36,16 @@
|
||||
#include <thread>
|
||||
|
||||
#ifdef OPENSPACE_CURL_ENABLED
|
||||
#ifdef WIN32
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable: 4574) // 'INCL_WINSOCK_API_TYPEDEFS' is defined to be '0'
|
||||
#endif // WIN32
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#pragma warning (pop)
|
||||
#endif // WIN32
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
@@ -318,7 +327,7 @@ DownloadManager::downloadRequestFiles(
|
||||
LDEBUG("Request File: " << requestFile);
|
||||
|
||||
bool isFinished = false;
|
||||
auto callback = [&](const FileFuture& f) {
|
||||
auto callback = [&](const FileFuture&) {
|
||||
LDEBUG("Finished: " << requestFile);
|
||||
std::ifstream temporary(requestFile);
|
||||
std::string line;
|
||||
|
||||
@@ -56,9 +56,15 @@
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable: 4574) // 'INCL_WINSOCK_API_TYPEDEFS' is defined to be '0'
|
||||
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <ws2tcpip.h>
|
||||
|
||||
#pragma warning (pop)
|
||||
#endif
|
||||
|
||||
#include <openspace/network/parallelconnection.h>
|
||||
|
||||
@@ -170,7 +170,7 @@ function (add_external_dependencies)
|
||||
set(SGCT_LIGHT_ONLY ON CACHE BOOL "" FORCE)
|
||||
set(SGCT_CUSTOMOUTPUTDIRS OFF CACHE BOOL "" FORCE)
|
||||
set(JPEG_TURBO_WITH_SIMD OFF CACHE BOOL "" FORCE)
|
||||
|
||||
|
||||
add_subdirectory(${OPENSPACE_EXT_DIR}/sgct)
|
||||
target_include_directories(libOpenSpace SYSTEM PUBLIC ${OPENSPACE_EXT_DIR}/sgct/include)
|
||||
target_link_libraries(
|
||||
@@ -243,6 +243,7 @@ function (add_external_dependencies)
|
||||
set(CMAKE_PREFIX_PATH
|
||||
"~/Qt/5.6/clang_64/lib/cmake"
|
||||
"~/Qt/5.7/clang_64/lib/cmake"
|
||||
"~/Qt/5.8/clang_64/lib/cmake"
|
||||
PARENT_SCOPE
|
||||
)
|
||||
endif ()
|
||||
|
||||
Reference in New Issue
Block a user