|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57351 - trunk/libs/program_options/src
From: ghost_at_[hidden]
Date: 2009-11-04 05:39:56
Author: vladimir_prus
Date: 2009-11-04 05:39:55 EST (Wed, 04 Nov 2009)
New Revision: 57351
URL: http://svn.boost.org/trac/boost/changeset/57351
Log:
Use extra parens to silence warnings re &&/|| on same level.
Text files modified:
trunk/libs/program_options/src/value_semantic.cpp | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
Modified: trunk/libs/program_options/src/value_semantic.cpp
==============================================================================
--- trunk/libs/program_options/src/value_semantic.cpp (original)
+++ trunk/libs/program_options/src/value_semantic.cpp 2009-11-04 05:39:55 EST (Wed, 04 Nov 2009)
@@ -171,8 +171,8 @@
check_first_occurrence(v);
string s(get_single_string(xs));
if (!s.empty() && (
- (*s.begin() == '\'' && *s.rbegin() == '\'' ||
- *s.begin() == '"' && *s.rbegin() == '"')))
+ (*s.begin() == '\'' && *s.rbegin() == '\'') ||
+ (*s.begin() == '"' && *s.rbegin() == '"')))
{
v = any(s.substr(1, s.size()-2));
}
@@ -186,8 +186,9 @@
{
check_first_occurrence(v);
wstring s(get_single_string(xs));
- if (*s.begin() == L'\'' && *s.rbegin() == L'\'' ||
- *s.begin() == L'"' && *s.rbegin() == L'"')
+ if (!s.empty() && (
+ (*s.begin() == L'\'' && *s.rbegin() == L'\'') ||
+ (*s.begin() == L'"' && *s.rbegin() == L'"')))
v = any(s.substr(1, s.size()-2));
else
v = any(s);
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk