Remove more warnings

This commit is contained in:
Alexander Bock
2015-05-23 22:42:51 +02:00
parent 7f390ef8e5
commit f1e6ad6f3d
7 changed files with 14 additions and 9 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ public:
void deinitializeGL();
bool mouseButtonCallback(int key, int action);
bool mouseWheelCallback(int position);
bool mouseWheelCallback(double position);
bool keyCallback(int key, int action);
bool charCallback(unsigned int character);
@@ -108,8 +108,8 @@ public:
void keyboardCallback(int key, int action);
void mouseButtonCallback(int button, int action);
void mousePositionCallback(int x, int y);
void mouseScrollWheelCallback(int pos);
void mousePositionCallback(double x, double y);
void mouseScrollWheelCallback(double pos);
double deltaTime() const;
+1 -1
View File
@@ -650,7 +650,7 @@ void OpenSpaceEngine::keyboardCallback(int key, int action) {
return;
}
if (key == _console->commandInputButton() && (action == SGCT_PRESS || action == SGCT_REPEAT))
if (static_cast<unsigned int>(key) == _console->commandInputButton() && (action == SGCT_PRESS || action == SGCT_REPEAT))
_console->toggleVisibility();
if (!_console->isVisible()) {
+1 -1
View File
@@ -294,7 +294,7 @@ bool GUI::mouseButtonCallback(int key, int action) {
return consumeEvent;
}
bool GUI::mouseWheelCallback(int position) {
bool GUI::mouseWheelCallback(double position) {
ImGuiIO& io = ImGui::GetIO();
bool consumeEvent = io.WantCaptureMouse;
if (consumeEvent)
+4
View File
@@ -112,7 +112,11 @@ namespace {
static const int bufferSize = 256;
static char buffer[bufferSize];
#ifdef _MSC_VER
strcpy_s(buffer, p->value().length() + 1, p->value().c_str());
#else
strcpy(buffer, p->value().c_str());
#endif
ImGui::InputText((ownerName + "." + name).c_str(), buffer, bufferSize);
std::string newValue(buffer);
+4 -4
View File
@@ -405,15 +405,15 @@ void InteractionHandler::mouseButtonCallback(int button, int action) {
_mouseController->button(MouseAction(action), MouseButton(button));
}
void InteractionHandler::mousePositionCallback(int x, int y) {
void InteractionHandler::mousePositionCallback(double x, double y) {
if (_mouseController)
// TODO Remap screen coordinates to [0,1]
_mouseController->move(float(x), float(y));
_mouseController->move(static_cast<float>(x), static_cast<float>(y));
}
void InteractionHandler::mouseScrollWheelCallback(int pos) {
void InteractionHandler::mouseScrollWheelCallback(double pos) {
if (_mouseController)
_mouseController->scrollWheel(pos);
_mouseController->scrollWheel(static_cast<int>(pos));
}
void InteractionHandler::orbit(const float &dx, const float &dy, const float &dz, const float &dist){
+1
View File
@@ -331,6 +331,7 @@ function (handle_internal_modules)
create_library_name(${module} libraryName)
add_subdirectory(${OPENSPACE_MODULE_DIR}/${module})
target_link_libraries(OpenSpace ${libraryName})
target_link_libraries(libOpenSpace ${libraryName})
create_define_name(${module} defineName)
target_compile_definitions(libOpenSpace PUBLIC "${defineName}")