Skip to content

Commit

Permalink
Handle MSVC warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ev-mp committed Apr 8, 2021
1 parent f7960ff commit 5c6ad4c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion common/model-views.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5866,7 +5866,7 @@ namespace rs2
model.add_log(to_string() << "Setting " << opt_model.opt << " to "
<< new_val << " (" << labels[selected] << ")");

opt_model.set_option(opt_model.opt, new_val, error_message);
opt_model.set_option(opt_model.opt, static_cast<float>(new_val), error_message);

// Only apply preset to GUI if set_option was succesful
selected_file_preset = "";
Expand Down
2 changes: 1 addition & 1 deletion common/output-model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void output_model::open(ux_window& win)
{
is_output_open = true;
config_file::instance().set(configurations::viewer::output_open, true);
default_log_h = (int)((win.height() - 100) / 2);
default_log_h = static_cast<int>((win.height() - 100) / 2);
new_log = true;
}

Expand Down
2 changes: 1 addition & 1 deletion common/viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ namespace rs2

for (auto& option : curr_exporter->second.options)
{
exporter->set_option(option.first, option.second);
exporter->set_option(option.first, static_cast<float>(option.second));
}

export_frame(fname, std::move(exporter), *not_model, data);
Expand Down
2 changes: 1 addition & 1 deletion src/gl/yuy2rgb-gl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#ifndef NOMINMAX
#define NOMINMAX
#endif
#endif // NOMINMAX

#include <glad/glad.h>

Expand Down
2 changes: 1 addition & 1 deletion tools/realsense-viewer/realsense-viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ int main(int argc, const char** argv) try

auto output_rect = rect{ viewer_model.panel_width,
window.height() - viewer_model.get_output_height(),
window.width() - viewer_model.panel_width, viewer_model.get_output_height() };
window.width() - viewer_model.panel_width, float(viewer_model.get_output_height()) };

viewer_model.not_model->output.draw(window, output_rect, *device_models);

Expand Down

0 comments on commit 5c6ad4c

Please sign in to comment.