Update of /cvsroot/ufraw/ufraw
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv20842
Modified Files:
ufraw_lensfun.cc
Log Message:
Add 2 digits of accuracy in XML to lensfun's parameters.
Index: ufraw_lensfun.cc
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_lensfun.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- ufraw_lensfun.cc 27 Feb 2010 14:30:07 -0000 1.5
+++ ufraw_lensfun.cc 1 Mar 2010 21:42:30 -0000 1.6
@@ -179,6 +179,19 @@
extern "C" { UFName ufModel = "Model"; }
+class Param : public UFNumber {
+public:
+ Param(UFName name, double min, double max, double defaultValue) :
+ UFNumber(name, min, max, defaultValue) { }
+ std::string XML(const char *indent) const {
+ char num[10];
+ g_snprintf(num, 10, "%.*lf", AccuracyDigits()+2, DoubleValue());
+ return (std::string)indent +
+ "<" + Name() + ">" + num + "</" + Name() + ">\n";
+ }
+
+};
+
extern "C" { UFName ufTCA = "TCA"; }
class TCA : public UFArray {
public:
@@ -195,7 +208,7 @@
(*this) << &Model;
assert(params != NULL);
for (int i = 0; params[i] != NULL; i++)
- Model << new UFNumber(params[i]->Name, params[i]->Min,
+ Model << new Param(params[i]->Name, params[i]->Min,
params[i]->Max, params[i]->Default);
}
}
@@ -265,7 +278,7 @@
(*this) << &Model;
assert(params != NULL);
for (int i = 0; params[i] != NULL; i++)
- Model << new UFNumber(params[i]->Name, params[i]->Min,
+ Model << new Param(params[i]->Name, params[i]->Min,
params[i]->Max, params[i]->Default);
}
}
@@ -353,7 +366,7 @@
(*this) << &Model;
assert(params != NULL);
for (int i = 0; params[i] != NULL; i++)
- Model << new UFNumber(params[i]->Name, params[i]->Min,
+ Model << new Param(params[i]->Name, params[i]->Min,
params[i]->Max, params[i]->Default);
}
}
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
ufraw-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ufraw-cvs