+ fix various warnings

This commit is contained in:
wmayer
2015-08-29 22:05:09 +02:00
parent 1a12d109e9
commit cb16fec6bb
25 changed files with 55 additions and 40 deletions

View File

@@ -92,7 +92,7 @@ void Toolpath::insertCommand(const Command &Cmd, int pos)
{
if (pos == -1) {
addCommand(Cmd);
} else if (pos <= vpcCommands.size()) {
} else if (pos <= static_cast<int>(vpcCommands.size())) {
Command *tmp = new Command(Cmd);
vpcCommands.insert(vpcCommands.begin()+pos,tmp);
} else {
@@ -106,7 +106,7 @@ void Toolpath::deleteCommand(int pos)
if (pos == -1) {
//delete(*vpcCommands.rbegin()); // causes crash
vpcCommands.pop_back();
} else if (pos <= vpcCommands.size()) {
} else if (pos <= static_cast<int>(vpcCommands.size())) {
vpcCommands.erase (vpcCommands.begin()+pos);
} else {
throw Base::Exception("Index not in range");