+// Read floats as doubles then just type cast it down.
+bool wxConfigBase::Read(const wxString& key, float* val) const
+{
+ wxCHECK_MSG( val, false, wxT("wxConfig::Read(): NULL parameter") );
+
+ double temp;
+ if ( !Read(key, &temp) )
+ return false;
+
+ wxCHECK_MSG( fabs(temp) <= FLT_MAX, false,
+ wxT("float overflow in wxConfig::Read") );
+ wxCHECK_MSG( (temp == 0.0) || (fabs(temp) >= FLT_MIN), false,
+ wxT("float underflow in wxConfig::Read") );
+
+ *val = static_cast<float>(temp);
+
+ return true;
+}
+
+bool wxConfigBase::Read(const wxString& key, float* val, float defVal) const
+{
+ wxCHECK_MSG( val, false, wxT("wxConfig::Read(): NULL parameter") );
+
+ if ( Read(key, val) )
+ return true;
+
+ *val = defVal;
+ return false;
+}
+