From cd59c26a0e554e1656d72ed67033474f3d6fe977 Mon Sep 17 00:00:00 2001 From: jules Date: Mon, 20 Mar 2017 17:31:18 +0000 Subject: [PATCH] Added some JUCE_API flags to some RelativeTime global operators --- modules/juce_core/time/juce_RelativeTime.cpp | 16 ++++++++-------- modules/juce_core/time/juce_RelativeTime.h | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/juce_core/time/juce_RelativeTime.cpp b/modules/juce_core/time/juce_RelativeTime.cpp index 336e98d6d9..24e9b77f96 100644 --- a/modules/juce_core/time/juce_RelativeTime.cpp +++ b/modules/juce_core/time/juce_RelativeTime.cpp @@ -56,15 +56,15 @@ RelativeTime RelativeTime::operator-= (RelativeTime t) noexcept { numSeconds RelativeTime RelativeTime::operator+= (const double secs) noexcept { numSeconds += secs; return *this; } RelativeTime RelativeTime::operator-= (const double secs) noexcept { numSeconds -= secs; return *this; } -RelativeTime operator+ (RelativeTime t1, RelativeTime t2) noexcept { return t1 += t2; } -RelativeTime operator- (RelativeTime t1, RelativeTime t2) noexcept { return t1 -= t2; } +JUCE_API RelativeTime JUCE_CALLTYPE operator+ (RelativeTime t1, RelativeTime t2) noexcept { return t1 += t2; } +JUCE_API RelativeTime JUCE_CALLTYPE operator- (RelativeTime t1, RelativeTime t2) noexcept { return t1 -= t2; } -bool operator== (RelativeTime t1, RelativeTime t2) noexcept { return t1.inSeconds() == t2.inSeconds(); } -bool operator!= (RelativeTime t1, RelativeTime t2) noexcept { return t1.inSeconds() != t2.inSeconds(); } -bool operator> (RelativeTime t1, RelativeTime t2) noexcept { return t1.inSeconds() > t2.inSeconds(); } -bool operator< (RelativeTime t1, RelativeTime t2) noexcept { return t1.inSeconds() < t2.inSeconds(); } -bool operator>= (RelativeTime t1, RelativeTime t2) noexcept { return t1.inSeconds() >= t2.inSeconds(); } -bool operator<= (RelativeTime t1, RelativeTime t2) noexcept { return t1.inSeconds() <= t2.inSeconds(); } +JUCE_API bool JUCE_CALLTYPE operator== (RelativeTime t1, RelativeTime t2) noexcept { return t1.inSeconds() == t2.inSeconds(); } +JUCE_API bool JUCE_CALLTYPE operator!= (RelativeTime t1, RelativeTime t2) noexcept { return t1.inSeconds() != t2.inSeconds(); } +JUCE_API bool JUCE_CALLTYPE operator> (RelativeTime t1, RelativeTime t2) noexcept { return t1.inSeconds() > t2.inSeconds(); } +JUCE_API bool JUCE_CALLTYPE operator< (RelativeTime t1, RelativeTime t2) noexcept { return t1.inSeconds() < t2.inSeconds(); } +JUCE_API bool JUCE_CALLTYPE operator>= (RelativeTime t1, RelativeTime t2) noexcept { return t1.inSeconds() >= t2.inSeconds(); } +JUCE_API bool JUCE_CALLTYPE operator<= (RelativeTime t1, RelativeTime t2) noexcept { return t1.inSeconds() <= t2.inSeconds(); } //============================================================================== static void translateTimeField (String& result, int n, const char* singular, const char* plural) diff --git a/modules/juce_core/time/juce_RelativeTime.h b/modules/juce_core/time/juce_RelativeTime.h index 2772e176e1..1f59a39b99 100644 --- a/modules/juce_core/time/juce_RelativeTime.h +++ b/modules/juce_core/time/juce_RelativeTime.h @@ -162,20 +162,20 @@ private: //============================================================================== /** Compares two RelativeTimes. */ -bool operator== (RelativeTime t1, RelativeTime t2) noexcept; +JUCE_API bool JUCE_CALLTYPE operator== (RelativeTime t1, RelativeTime t2) noexcept; /** Compares two RelativeTimes. */ -bool operator!= (RelativeTime t1, RelativeTime t2) noexcept; +JUCE_API bool JUCE_CALLTYPE operator!= (RelativeTime t1, RelativeTime t2) noexcept; /** Compares two RelativeTimes. */ -bool operator> (RelativeTime t1, RelativeTime t2) noexcept; +JUCE_API bool JUCE_CALLTYPE operator> (RelativeTime t1, RelativeTime t2) noexcept; /** Compares two RelativeTimes. */ -bool operator< (RelativeTime t1, RelativeTime t2) noexcept; +JUCE_API bool JUCE_CALLTYPE operator< (RelativeTime t1, RelativeTime t2) noexcept; /** Compares two RelativeTimes. */ -bool operator>= (RelativeTime t1, RelativeTime t2) noexcept; +JUCE_API bool JUCE_CALLTYPE operator>= (RelativeTime t1, RelativeTime t2) noexcept; /** Compares two RelativeTimes. */ -bool operator<= (RelativeTime t1, RelativeTime t2) noexcept; +JUCE_API bool JUCE_CALLTYPE operator<= (RelativeTime t1, RelativeTime t2) noexcept; //============================================================================== /** Adds two RelativeTimes together. */ -RelativeTime operator+ (RelativeTime t1, RelativeTime t2) noexcept; +JUCE_API RelativeTime JUCE_CALLTYPE operator+ (RelativeTime t1, RelativeTime t2) noexcept; /** Subtracts two RelativeTimes. */ -RelativeTime operator- (RelativeTime t1, RelativeTime t2) noexcept; +JUCE_API RelativeTime JUCE_CALLTYPE operator- (RelativeTime t1, RelativeTime t2) noexcept;