2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 36e230fc authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Fixed a couple of GCC warnings and CppCheck issues.

parent b4b9cfbf
...@@ -146,8 +146,8 @@ namespace campvis { ...@@ -146,8 +146,8 @@ namespace campvis {
template<typename T> template<typename T>
AbstractAdjusterWidget<T>::AbstractAdjusterWidget(QWidget* parent /*= 0*/) AbstractAdjusterWidget<T>::AbstractAdjusterWidget(QWidget* parent /*= 0*/)
: QWidget(parent) : QWidget(parent)
, _slider(0) , _slider(nullptr)
, _spinBox(0) , _spinBox(nullptr)
{ {
_spinBox = new typename AdjusterWidgetTraits<T>::SpinBoxType; _spinBox = new typename AdjusterWidgetTraits<T>::SpinBoxType;
_spinBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); _spinBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
......
...@@ -30,12 +30,9 @@ namespace campvis { ...@@ -30,12 +30,9 @@ namespace campvis {
QuadRenderer::QuadRenderer() QuadRenderer::QuadRenderer()
: cgt::Singleton<QuadRenderer>() : cgt::Singleton<QuadRenderer>()
, _quad11(nullptr) , _quad11(GeometryDataFactory::createQuad(cgt::vec3(-1.f, -1.f, 0.f), cgt::vec3(1.f), cgt::vec3(0.f), cgt::vec3(1.f)))
, _quad01(nullptr) , _quad01(GeometryDataFactory::createQuad(cgt::vec3(0.f), cgt::vec3(1.f), cgt::vec3(0.f), cgt::vec3(1.f)))
{ {}
_quad11 = GeometryDataFactory::createQuad(cgt::vec3(-1.f, -1.f, 0.f), cgt::vec3(1.f), cgt::vec3(0.f), cgt::vec3(1.f));
_quad01 = GeometryDataFactory::createQuad(cgt::vec3(0.f), cgt::vec3(1.f), cgt::vec3(0.f), cgt::vec3(1.f));
}
QuadRenderer::~QuadRenderer() { QuadRenderer::~QuadRenderer() {
} }
......
...@@ -189,7 +189,7 @@ namespace campvis { ...@@ -189,7 +189,7 @@ namespace campvis {
while (!file->eof()) { while (!file->eof()) {
std::string line = StringUtils::trim(file->getLine()); std::string line = StringUtils::trim(file->getLine());
if (line.find("ElementDataFile") == 0) { if (line.compare("ElementDataFile") == 0) {
offset = file->tell(); offset = file->tell();
} }
file->close(); file->close();
......
...@@ -57,6 +57,8 @@ MACRO(DECLARE_LUA_MODULE InterfaceFile) ...@@ -57,6 +57,8 @@ MACRO(DECLARE_LUA_MODULE InterfaceFile)
IF(WIN32) IF(WIN32)
ADD_DEFINITIONS("/wd4244 /wd4267") ADD_DEFINITIONS("/wd4244 /wd4267")
ELSEIF(UNIX)
ADD_DEFINITIONS("-Wno-error=maybe-uninitialized")
ENDIF() ENDIF()
SET_SOURCE_FILES_PROPERTIES(${InterfaceFile} PROPERTIES CPLUSPLUS ON) SET_SOURCE_FILES_PROPERTIES(${InterfaceFile} PROPERTIES CPLUSPLUS ON)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment