Fixed formatting issue in the FUNCTIONS block (MUSR-171)

This commit is contained in:
Bastian M. Wojek 2011-03-19 14:01:05 +00:00
parent 2d2cf448db
commit dc86404f88
2 changed files with 7 additions and 6 deletions

View File

@ -1,6 +1,6 @@
#---------------------------------------------------------------------
# ChangeLog
# AS, 2011/01/29
#
# $Id$
#---------------------------------------------------------------------
@ -15,9 +15,10 @@ NEW any2many: an attempt to write the universial musr-data-file converter. Just
NEW musrt0: added the possibility to show the t0 saved in the data file 's'. Furthermore added the option
--getT0FromPromptPeak, -g with <firstGoodBinOffset>: will, in non-interactive mode estimate the t0's from
the prompt peak and write it into the msr-file (MUSR-133).
FIXED plotting issues described in (MUSR-174).
FIXED formatting issues in the FUNCTIONS block (MUSR-171)
FIXED plotting issues described in MUSR-174.
FIXED accidental casting of a NULL pointer in msr2data
FIXED crash of musrfit if a run-data-files is not found (MUSR-176)
FIXED crash of musrfit if a run-data-file is not found (MUSR-176)
FIXED corrected time resolution for WKM from (ns) -> (us)
FIXED the formating of fixed parameters (step=0) where wrongly formatted (connected to MUSR-167). This
should be done correctly now.

View File

@ -569,7 +569,7 @@ void PFunction::EvalTreeForStringExpression(iter_t const& i)
assert(i->children.size() == 0);
if (*i->value.begin() == '-')
fFuncString += "(";
fFuncString += string(i->value.begin(), i->value.end()).c_str();
fFuncString += boost::algorithm::trim_copy(string(i->value.begin(), i->value.end())).c_str();
if (*i->value.begin() == '-')
fFuncString += ")";
} else if (i->value.id() == PFunctionGrammar::constPiID) {
@ -582,10 +582,10 @@ void PFunction::EvalTreeForStringExpression(iter_t const& i)
fFuncString += string(i->value.begin(), i->value.end()).c_str(); // funx
} else if (i->value.id() == PFunctionGrammar::parameterID) {
assert(i->children.size() == 0);
fFuncString += string(i->value.begin(), i->value.end()).c_str();
fFuncString += boost::algorithm::trim_copy(string(i->value.begin(), i->value.end())).c_str();
} else if (i->value.id() == PFunctionGrammar::mapID) {
assert(i->children.size() == 0);
fFuncString += string(i->value.begin(), i->value.end()).c_str();
fFuncString += boost::algorithm::trim_copy(string(i->value.begin(), i->value.end())).c_str();
} else if (i->value.id() == PFunctionGrammar::functionID) {
assert(i->children.size() == 3);
fFuncString += string(i->value.begin(), i->value.end()).c_str(); // keep function name