From 7622793080dab91375acc43da56852e28c8306fe Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Fri, 10 Jul 2009 18:50:43 +0100 Subject: [PATCH] Small tidy up of previous patch No functional change. Signed-off-by: Marco Costalba --- src/uci.cpp | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/uci.cpp b/src/uci.cpp index 1f1ba09..36848d8 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -242,12 +242,10 @@ namespace { } if (token == "value") { - // Skip whitespace. There should be a better way to do this, but - // I don't know how... - while(isspace(uip.get())); - uip.unget(); + // Reads until end of line and left trim white space + getline(uip, token); + token.erase(0, token.find_first_not_of(" \n\r\t")); - getline(uip, token); // reads until end of line set_option_value(name, token); } else push_button(name); -- 1.7.0.4