Ref T709, only update settings if changed

This commit is contained in:
Klaus Basan
2019-07-31 16:47:52 +02:00
committed by Mat Sutcliffe
parent 79f347cc1b
commit 447152bd13
4 changed files with 34 additions and 38 deletions

View File

@@ -15,6 +15,7 @@
#include <fstream>
#include <vector>
#include <cctype>
#include <cmath>
#include <algorithm>
// Strict header only X-Plane model parser utils shared between BlackMisc and XSwiftBus.
@@ -155,6 +156,15 @@ namespace BlackMisc
return t ? tr : fa;
}
//! Qt free version of fuzzy compare
inline bool isFuzzyEqual(double v1, double v2)
{
// we allow some epsilon here
// static const double Epsilon = 5 * std::numeric_limits<double>::min();
static const double Epsilon = 1E-08;
return (fabs(v1 - v2) < Epsilon);
}
//! Trim whitespace from the beginning and end, and replace sequences of whitespace with single space characters
inline std::string simplifyWhitespace(const std::string &s)
{