X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWeatherCM%2FFGTemperatureItem.h;h=f6cc5e04eb865fa4e5b6b93a90f0ff622a7d473e;hb=a4e81f4ff075e6a3c0c2ea1b5a29c0bcdfdbc671;hp=063acbf1fb9b75cc287bd21931ece05140fba88b;hpb=eddea671a276ea5337867d09699730876fce7085;p=flightgear.git diff --git a/src/WeatherCM/FGTemperatureItem.h b/src/WeatherCM/FGTemperatureItem.h index 063acbf1f..f6cc5e04e 100644 --- a/src/WeatherCM/FGTemperatureItem.h +++ b/src/WeatherCM/FGTemperatureItem.h @@ -48,8 +48,8 @@ HISTORY /****************************************************************************/ #include "FGWeatherDefs.h" -//for the case that mutable isn't supported: -#include "Include/compiler.h" +// for the case that mutable isn't supported: +#include /****************************************************************************/ /* DEFINES */ @@ -63,20 +63,23 @@ FGTemperatureItem operator-(const FGTemperatureItem& arg); class FGTemperatureItem { private: - mutable WeatherPrecition value; - WeatherPrecition alt; + mutable WeatherPrecision value; + WeatherPrecision alt; protected: public: - FGTemperatureItem(const WeatherPrecition& a, const WeatherPrecition& v) {alt = a; value = v;} - FGTemperatureItem(const WeatherPrecition& v) {alt = 0.0; value = v;} - FGTemperatureItem() {alt = 0.0; value = (WeatherPrecition)FG_WEATHER_DEFAULT_TEMPERATURE;} + FGTemperatureItem(const WeatherPrecision& a, const WeatherPrecision& v) {alt = a; value = v;} + FGTemperatureItem(const WeatherPrecision& v) {alt = 0.0; value = v;} + FGTemperatureItem() {alt = 0.0; value = (WeatherPrecision)FG_WEATHER_DEFAULT_TEMPERATURE;} - WeatherPrecition getValue() const { return value; }; - WeatherPrecition getAlt() const { return alt; }; + WeatherPrecision getValue() const { return value; }; + WeatherPrecision getAlt() const { return alt; }; - FGTemperatureItem& operator*= (const WeatherPrecition& arg); + void setAlt (WeatherPrecision x) { alt = x; } + void setValue(WeatherPrecision x) { value = x; } + + FGTemperatureItem& operator*= (const WeatherPrecision& arg); FGTemperatureItem& operator+= (const FGTemperatureItem& arg); FGTemperatureItem& operator-= (const FGTemperatureItem& arg); @@ -85,7 +88,7 @@ public: }; -inline FGTemperatureItem& FGTemperatureItem::operator*= (const WeatherPrecition& arg) +inline FGTemperatureItem& FGTemperatureItem::operator*= (const WeatherPrecision& arg) { value *= arg; return *this;