Remove clang warnings

Update SGCT repository
This commit is contained in:
Alexander Bock
2017-12-29 19:47:33 +01:00
parent c9a3c68f19
commit cc178d03f3
17 changed files with 61 additions and 115 deletions

View File

@@ -51,10 +51,6 @@
namespace {
constexpr const char* _loggerCat = "DownloadManager";
constexpr const char* RequestIdentifier = "identifier";
constexpr const char* RequestFileVersion = "file_version";
constexpr const char* RequestApplicationVersion = "application_version";
struct ProgressInformation {
std::shared_ptr<openspace::DownloadManager::FileFuture> future;
std::chrono::system_clock::time_point startTime;

View File

@@ -111,11 +111,9 @@ namespace {
constexpr const char* SgctConfigArgumentCommand = "-config";
constexpr const int CacheVersion = 1;
constexpr const int DownloadVersion = 1;
const glm::ivec3 FontAtlasSize{ 1536, 1536, 1 };
struct {
std::string configurationName;
std::string sgctConfigurationName;
@@ -707,7 +705,7 @@ void OpenSpaceEngine::loadSingleAsset(const std::string& assetPath) {
}
}
}
_loadingScreen->setItemNumber(resourceSyncs.size());
_loadingScreen->setItemNumber(static_cast<int>(resourceSyncs.size()));
bool loading = true;
while (loading) {

View File

@@ -73,7 +73,7 @@ void SettingsEngine::initialize() {
// Set interaction to change ConfigurationManager and schedule the load
_scenes.onChange([this, nScenes, sceneDir]() {
if (_scenes == nScenes) {
if (_scenes == static_cast<int>(nScenes)) {
OsEng.scheduleLoadSingleAsset("");
} else {
std::string sceneFile = _scenes.getDescriptionByValue(_scenes);

View File

@@ -1266,9 +1266,10 @@ void saveTextureToPPMFile(const GLenum color_buffer_attachment,
ppmFile.open(fileName.c_str(), std::fstream::out);
if (ppmFile.is_open()) {
unsigned char * pixels = new unsigned char[width*height * 3];
for (int t = 0; t < width*height * 3; ++t)
unsigned char* pixels = new unsigned char[width*height * 3];
for (int t = 0; t < width*height * 3; ++t) {
pixels[t] = 255;
}
if (color_buffer_attachment != GL_DEPTH_ATTACHMENT) {
glReadBuffer(color_buffer_attachment);
@@ -1295,9 +1296,9 @@ void saveTextureToPPMFile(const GLenum color_buffer_attachment,
int k = 0;
for (int i = 0; i < width; i++) {
for (int j = 0; j < height; j++) {
ppmFile << (unsigned int)pixels[k] << " "
<< (unsigned int)pixels[k + 1] << " "
<< (unsigned int)pixels[k + 2] << " ";
ppmFile << static_cast<unsigned int>(pixels[k]) << " "
<< static_cast<unsigned int>(pixels[k + 1]) << " "
<< static_cast<unsigned int>(pixels[k + 2]) << " ";
k += 3;
}
ppmFile << std::endl;

View File

@@ -239,10 +239,10 @@ RenderEngine::RenderEngine()
, _fadeDuration(2.f)
, _currentFadeTime(0.f)
, _fadeDirection(0)
, _nAaSamples(AaSamplesInfo, 4, 1, 16)
, _hdrExposure(HDRExposureInfo, 0.4f, 0.01f, 10.0f)
, _hdrBackground(BackgroundExposureInfo, 2.8f, 0.01f, 10.0f)
, _gamma(GammaInfo, 2.2f, 0.01f, 10.0f)
, _nAaSamples(AaSamplesInfo, 4, 1, 16)
, _frameNumber(0)
{
_doPerformanceMeasurements.onChange([this](){

View File

@@ -274,7 +274,7 @@ void ScriptEngine::addLibraryFunctions(lua_State* state, LuaLibrary& library,
for (void* d : p.userdata) {
lua_pushlightuserdata(state, d);
}
lua_pushcclosure(state, p.function, p.userdata.size());
lua_pushcclosure(state, p.function, static_cast<int>(p.userdata.size()));
lua_settable(state, TableOffset);
}