Hide overloaded wxTimeSpan and wxDateSpan operator*()

Define them in these classes scope instead of at the global scope.
This commit is contained in:
Vadim Zeitlin 2024-01-06 23:02:45 +01:00
parent 3c151ac815
commit 3b62433a3f

View file

@ -1278,6 +1278,8 @@ public:
return wxTimeSpan(*this).Multiply(n);
}
friend WXDLLIMPEXP_BASE wxTimeSpan operator*(int n, const wxTimeSpan& ts);
// return this timespan with opposite sign
wxTimeSpan Negate() const { return wxTimeSpan(-GetValue()); }
// negate the value of the timespan
@ -1531,6 +1533,7 @@ public:
{
return wxDateSpan(*this).Multiply(n);
}
friend WXDLLIMPEXP_BASE wxDateSpan operator*(int n, const wxDateSpan& ds);
// ds1 == d2 if and only if for every wxDateTime t t + ds1 == t + ds2
inline bool operator==(const wxDateSpan& ds) const
@ -2243,22 +2246,6 @@ inline wxDateSpan wxDateSpan::Subtract(const wxDateSpan& other) const
#undef MODIFY_AND_RETURN
// ============================================================================
// binary operators
// ============================================================================
// ----------------------------------------------------------------------------
// wxTimeSpan operators
// ----------------------------------------------------------------------------
wxTimeSpan WXDLLIMPEXP_BASE operator*(int n, const wxTimeSpan& ts);
// ----------------------------------------------------------------------------
// wxDateSpan
// ----------------------------------------------------------------------------
wxDateSpan WXDLLIMPEXP_BASE operator*(int n, const wxDateSpan& ds);
// ============================================================================
// other helper functions
// ============================================================================