Fixed several warnings

This commit is contained in:
Lukas Matena 2019-10-29 10:40:34 +01:00
parent 9e8ce66f70
commit 8b5561aec7
10 changed files with 14 additions and 17 deletions

View file

@ -4791,7 +4791,7 @@ bool Plater::undo_redo_string_getter(const bool is_undo, int idx, const char** o
const std::vector<UndoRedo::Snapshot>& ss_stack = p->undo_redo_stack().snapshots();
const int idx_in_ss_stack = p->get_active_snapshot_index() + (is_undo ? -(++idx) : idx);
if (0 < idx_in_ss_stack && idx_in_ss_stack < ss_stack.size() - 1) {
if (0 < idx_in_ss_stack && (size_t)idx_in_ss_stack < ss_stack.size() - 1) {
*out_text = ss_stack[idx_in_ss_stack].name.c_str();
return true;
}
@ -4804,7 +4804,7 @@ void Plater::undo_redo_topmost_string_getter(const bool is_undo, std::string& ou
const std::vector<UndoRedo::Snapshot>& ss_stack = p->undo_redo_stack().snapshots();
const int idx_in_ss_stack = p->get_active_snapshot_index() + (is_undo ? -1 : 0);
if (0 < idx_in_ss_stack && idx_in_ss_stack < ss_stack.size() - 1) {
if (0 < idx_in_ss_stack && (size_t)idx_in_ss_stack < ss_stack.size() - 1) {
out_text = ss_stack[idx_in_ss_stack].name;
return;
}