diff --git a/src/simulator/high-precision-128.cc b/src/simulator/high-precision-128.cc index 36b12067f..b9b2796b4 100644 --- a/src/simulator/high-precision-128.cc +++ b/src/simulator/high-precision-128.cc @@ -19,7 +19,7 @@ HighPrecision::HighPrecision (double value) } #define MASK_LO ((((uint128_t)1)<<64)-1) #define MASK_HI (~MASK_LO) -bool +void HighPrecision::Mul (HighPrecision const &o) { bool negResult, negA, negB; @@ -62,9 +62,8 @@ HighPrecision::Mul (HighPrecision const &o) // add the sign to the result result = negResult ? -result:result; m_value = result; - return true; } -bool +void HighPrecision::Div (HighPrecision const &o) { bool negResult, negA, negB; @@ -98,7 +97,6 @@ HighPrecision::Div (HighPrecision const &o) result = result + quo; result = negResult ? -result:result; m_value = result; - return true; } } // namespace ns3 diff --git a/src/simulator/high-precision-128.h b/src/simulator/high-precision-128.h index b1234c21f..7c4670493 100644 --- a/src/simulator/high-precision-128.h +++ b/src/simulator/high-precision-128.h @@ -39,10 +39,10 @@ public: inline int64_t GetInteger (void) const; inline double GetDouble (void) const; - inline bool Add (HighPrecision const &o); - inline bool Sub (HighPrecision const &o); - bool Mul (HighPrecision const &o); - bool Div (HighPrecision const &o); + inline void Add (HighPrecision const &o); + inline void Sub (HighPrecision const &o); + void Mul (HighPrecision const &o); + void Div (HighPrecision const &o); inline int Compare (HighPrecision const &o) const; inline static HighPrecision Zero (void); @@ -87,17 +87,15 @@ int64_t HighPrecision::GetInteger (void) const return v; } -bool +void HighPrecision::Add (HighPrecision const &o) { m_value += o.m_value; - return true; } -bool +void HighPrecision::Sub (HighPrecision const &o) { m_value -= o.m_value; - return true; } int diff --git a/src/simulator/high-precision-double.cc b/src/simulator/high-precision-double.cc index be6d6e1a1..460792f9e 100644 --- a/src/simulator/high-precision-double.cc +++ b/src/simulator/high-precision-double.cc @@ -51,29 +51,25 @@ HighPrecision::GetDouble (void) const { return m_value; } -bool +void HighPrecision::Add (HighPrecision const &o) { m_value += o.m_value; - return false; } -bool +void HighPrecision::Sub (HighPrecision const &o) { m_value -= o.m_value; - return false; } -bool +void HighPrecision::Mul (HighPrecision const &o) { m_value *= o.m_value; - return false; } -bool +void HighPrecision::Div (HighPrecision const &o) { m_value /= o.m_value; - return false; } int HighPrecision::Compare (HighPrecision const &o) const @@ -86,4 +82,4 @@ HighPrecision::Zero (void) return HighPrecision (0,0); } -}; // namespace ns3 +} // namespace ns3 diff --git a/src/simulator/high-precision-double.h b/src/simulator/high-precision-double.h index cf0c2a179..82c5e1ccd 100644 --- a/src/simulator/high-precision-double.h +++ b/src/simulator/high-precision-double.h @@ -40,10 +40,10 @@ public: int64_t GetInteger (void) const; double GetDouble (void) const; - bool Add (HighPrecision const &o); - bool Sub (HighPrecision const &o); - bool Mul (HighPrecision const &o); - bool Div (HighPrecision const &o); + void Add (HighPrecision const &o); + void Sub (HighPrecision const &o); + void Mul (HighPrecision const &o); + void Div (HighPrecision const &o); int Compare (HighPrecision const &o) const; static HighPrecision Zero (void); @@ -52,6 +52,6 @@ private: double m_value; }; -}; // namespace ns3 +} // namespace ns3 #endif /* HIGH_PRECISION_DOUBLE_H */