From 270ff61fbd82f3f97bf6f9cf950271993ded2d7b Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Sun, 13 Dec 2015 12:23:56 -0600 Subject: [PATCH] add parentheses around || that should be inside && --- plugins/autohauler.cpp | 2 +- plugins/autolabor.cpp | 2 +- plugins/rendermax/renderer_light.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/autohauler.cpp b/plugins/autohauler.cpp index a7a35797c..d7b233195 100644 --- a/plugins/autohauler.cpp +++ b/plugins/autohauler.cpp @@ -1136,7 +1136,7 @@ command_result autohauler (color_ostream &out, std::vector & param out << "All labors reset." << endl; return CR_OK; } - else if (parameters.size() == 1 && parameters[0] == "list" || parameters[0] == "status") + else if (parameters.size() == 1 && (parameters[0] == "list" || parameters[0] == "status")) { if (!enable_autohauler) { diff --git a/plugins/autolabor.cpp b/plugins/autolabor.cpp index 87b14729a..070744de0 100644 --- a/plugins/autolabor.cpp +++ b/plugins/autolabor.cpp @@ -1511,7 +1511,7 @@ command_result autolabor (color_ostream &out, std::vector & parame out << "All labors reset." << endl; return CR_OK; } - else if (parameters.size() == 1 && parameters[0] == "list" || parameters[0] == "status") + else if (parameters.size() == 1 && (parameters[0] == "list" || parameters[0] == "status")) { if (!enable_autolabor) { diff --git a/plugins/rendermax/renderer_light.cpp b/plugins/rendermax/renderer_light.cpp index 7dd6d46bc..5e6f2e2de 100644 --- a/plugins/rendermax/renderer_light.cpp +++ b/plugins/rendermax/renderer_light.cpp @@ -724,7 +724,7 @@ void lightingEngineViewscreen::doOcupancyAndLights() for(int i=0;iflows.size();i++) { df::flow_info* f=block->flows[i]; - if(f && f->density>0 && f->type==df::flow_type::Dragonfire || f->type==df::flow_type::Fire) + if(f && f->density>0 && (f->type==df::flow_type::Dragonfire || f->type==df::flow_type::Fire)) { df::coord2d pos=f->pos; pos=worldToViewportCoord(pos,vp,window2d);