From ebe8009affa34708bac1e8b69cf5b925ffe5cc82 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Mon, 25 Jun 2012 00:14:42 +0100 Subject: [PATCH] Reduce indentation in UCIOption::operator=() No functional change. Signed-off-by: Marco Costalba --- src/ucioption.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 4761004d..763db556 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -138,14 +138,14 @@ void UCIOption::operator=(const string& v) { assert(!type.empty()); - if ( (type == "button" || !v.empty()) - && (type != "check" || (v == "true" || v == "false")) - && (type != "spin" || (atoi(v.c_str()) >= min && atoi(v.c_str()) <= max))) - { - if (type != "button") - currentValue = v; - - if (on_change) - (*on_change)(*this); - } + if ( (type != "button" && v.empty()) + || (type == "check" && v != "true" && v != "false") + || (type == "spin" && (atoi(v.c_str()) < min || atoi(v.c_str()) > max))) + return; + + if (type != "button") + currentValue = v; + + if (on_change) + (*on_change)(*this); } -- 2.39.2