Fixed "Substract" typo

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7464 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2000-05-23 06:23:59 +00:00
parent 9047a3c139
commit 0126cabac6
2 changed files with 36 additions and 36 deletions

View File

@@ -64,7 +64,7 @@ class WXDLLEXPORT wxDateSpan;
wxTimeSpan + wxTimeSpan = wxTimeSpan wxTimeSpan + wxTimeSpan = wxTimeSpan
wxDateSpan + wxDateSpan = wxDateSpan wxDateSpan + wxDateSpan = wxDateSpan
substraction subtraction
------------ ------------
wxDateTime - wxDateTime = wxTimeSpan wxDateTime - wxDateTime = wxTimeSpan
wxDateTime - wxTimeSpan = wxDateTime wxDateTime - wxTimeSpan = wxDateTime
@@ -85,7 +85,7 @@ class WXDLLEXPORT wxDateSpan;
-wxDateSpan = wxDateSpan -wxDateSpan = wxDateSpan
For each binary operation OP (+, -, *) we have the following operatorOP=() as For each binary operation OP (+, -, *) we have the following operatorOP=() as
a method and the method with a symbolic name OPER (Add, Substract, Multiply) a method and the method with a symbolic name OPER (Add, Subtract, Multiply)
as a synonym for it and another const method with the same name which returns as a synonym for it and another const method with the same name which returns
the changed copy of the object and operatorOP() as a global function which is the changed copy of the object and operatorOP() as a global function which is
implemented in terms of the const version of OPEN. For the unary - we have implemented in terms of the const version of OPEN. For the unary - we have
@@ -856,10 +856,10 @@ public:
inline wxDateTime& operator+=(const wxTimeSpan& diff); inline wxDateTime& operator+=(const wxTimeSpan& diff);
// return the difference of the date with a time span // return the difference of the date with a time span
inline wxDateTime Substract(const wxTimeSpan& diff) const; inline wxDateTime Subtract(const wxTimeSpan& diff) const;
// substract a time span (positive or negative) // subtract a time span (positive or negative)
inline wxDateTime& Substract(const wxTimeSpan& diff); inline wxDateTime& Subtract(const wxTimeSpan& diff);
// substract a time span (positive or negative) // subtract a time span (positive or negative)
inline wxDateTime& operator-=(const wxTimeSpan& diff); inline wxDateTime& operator-=(const wxTimeSpan& diff);
// return the sum of the date with a date span // return the sum of the date with a date span
@@ -870,14 +870,14 @@ public:
inline wxDateTime& operator+=(const wxDateSpan& diff); inline wxDateTime& operator+=(const wxDateSpan& diff);
// return the difference of the date with a date span // return the difference of the date with a date span
inline wxDateTime Substract(const wxDateSpan& diff) const; inline wxDateTime Subtract(const wxDateSpan& diff) const;
// substract a date span (positive or negative) // subtract a date span (positive or negative)
inline wxDateTime& Substract(const wxDateSpan& diff); inline wxDateTime& Subtract(const wxDateSpan& diff);
// substract a date span (positive or negative) // subtract a date span (positive or negative)
inline wxDateTime& operator-=(const wxDateSpan& diff); inline wxDateTime& operator-=(const wxDateSpan& diff);
// return the difference between two dates // return the difference between two dates
inline wxTimeSpan Substract(const wxDateTime& dt) const; inline wxTimeSpan Subtract(const wxDateTime& dt) const;
// conversion to/from text: all conversions from text return the pointer to // conversion to/from text: all conversions from text return the pointer to
// the next character following the date specification (i.e. the one where // the next character following the date specification (i.e. the one where
@@ -962,7 +962,7 @@ private:
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// This class contains a difference between 2 wxDateTime values, so it makes // This class contains a difference between 2 wxDateTime values, so it makes
// sense to add it to wxDateTime and it is the result of substraction of 2 // sense to add it to wxDateTime and it is the result of subtraction of 2
// objects of that class. See also wxDateSpan. // objects of that class. See also wxDateSpan.
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -1018,11 +1018,11 @@ public:
wxTimeSpan& operator+=(const wxTimeSpan& diff) { return Add(diff); } wxTimeSpan& operator+=(const wxTimeSpan& diff) { return Add(diff); }
// return the difference of two timespans // return the difference of two timespans
inline wxTimeSpan Substract(const wxTimeSpan& diff) const; inline wxTimeSpan Subtract(const wxTimeSpan& diff) const;
// substract another timespan // subtract another timespan
inline wxTimeSpan& Substract(const wxTimeSpan& diff); inline wxTimeSpan& Subtract(const wxTimeSpan& diff);
// substract another timespan // subtract another timespan
wxTimeSpan& operator-=(const wxTimeSpan& diff) { return Substract(diff); } wxTimeSpan& operator-=(const wxTimeSpan& diff) { return Subtract(diff); }
// multiply timespan by a scalar // multiply timespan by a scalar
inline wxTimeSpan Multiply(int n) const; inline wxTimeSpan Multiply(int n) const;
@@ -1126,7 +1126,7 @@ private:
// won't be changed unless the resulting date would be invalid: for example, // won't be changed unless the resulting date would be invalid: for example,
// Jan 31 + 1 month will be Feb 28, not (non existing) Feb 31. // Jan 31 + 1 month will be Feb 28, not (non existing) Feb 31.
// //
// Because of this feature, adding and substracting back again the same // Because of this feature, adding and subtracting back again the same
// wxDateSpan will *not*, in general give back the original date: Feb 28 - 1 // wxDateSpan will *not*, in general give back the original date: Feb 28 - 1
// month will be Jan 28, not Jan 31! // month will be Jan 28, not Jan 31!
// //
@@ -1213,10 +1213,10 @@ public:
inline wxDateSpan& operator+=(const wxDateSpan& other); inline wxDateSpan& operator+=(const wxDateSpan& other);
// return difference of two date spans // return difference of two date spans
inline wxDateSpan Substract(const wxDateSpan& other) const; inline wxDateSpan Subtract(const wxDateSpan& other) const;
// substract another wxDateSpan from us // subtract another wxDateSpan from us
inline wxDateSpan& Substract(const wxDateSpan& other); inline wxDateSpan& Subtract(const wxDateSpan& other);
// substract another wxDateSpan from us // subtract another wxDateSpan from us
inline wxDateSpan& operator-=(const wxDateSpan& other); inline wxDateSpan& operator-=(const wxDateSpan& other);
// return a copy of this time span with changed sign // return a copy of this time span with changed sign
@@ -1351,7 +1351,7 @@ inline wxDateTime WXDLLEXPORT operator+(const wxDateTime& dt,
inline wxDateTime WXDLLEXPORT operator-(const wxDateTime& dt, inline wxDateTime WXDLLEXPORT operator-(const wxDateTime& dt,
const wxTimeSpan& ts) const wxTimeSpan& ts)
{ {
return dt.Substract(ts); return dt.Subtract(ts);
} }
inline wxDateTime WXDLLEXPORT operator+(const wxDateTime& dt, inline wxDateTime WXDLLEXPORT operator+(const wxDateTime& dt,
@@ -1363,13 +1363,13 @@ inline wxDateTime WXDLLEXPORT operator+(const wxDateTime& dt,
inline wxDateTime WXDLLEXPORT operator-(const wxDateTime& dt, inline wxDateTime WXDLLEXPORT operator-(const wxDateTime& dt,
const wxDateSpan& ds) const wxDateSpan& ds)
{ {
return dt.Substract(ds); return dt.Subtract(ds);
} }
inline wxTimeSpan WXDLLEXPORT operator-(const wxDateTime& dt1, inline wxTimeSpan WXDLLEXPORT operator-(const wxDateTime& dt1,
const wxDateTime& dt2) const wxDateTime& dt2)
{ {
return dt1.Substract(dt2); return dt1.Subtract(dt2);
} }
// comparison // comparison

View File

@@ -271,7 +271,7 @@ inline bool wxDateTime::IsSameTime(const wxDateTime& dt) const
inline bool wxDateTime::IsEqualUpTo(const wxDateTime& dt, inline bool wxDateTime::IsEqualUpTo(const wxDateTime& dt,
const wxTimeSpan& ts) const const wxTimeSpan& ts) const
{ {
return IsBetween(dt.Substract(ts), dt.Add(ts)); return IsBetween(dt.Subtract(ts), dt.Add(ts));
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -299,14 +299,14 @@ inline wxDateTime& wxDateTime::operator+=(const wxTimeSpan& diff)
return Add(diff); return Add(diff);
} }
inline wxDateTime wxDateTime::Substract(const wxTimeSpan& diff) const inline wxDateTime wxDateTime::Subtract(const wxTimeSpan& diff) const
{ {
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime")); wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
return wxDateTime(m_time - diff.GetValue()); return wxDateTime(m_time - diff.GetValue());
} }
inline wxDateTime& wxDateTime::Substract(const wxTimeSpan& diff) inline wxDateTime& wxDateTime::Subtract(const wxTimeSpan& diff)
{ {
wxASSERT_MSG( IsValid(), _T("invalid wxDateTime")); wxASSERT_MSG( IsValid(), _T("invalid wxDateTime"));
@@ -317,10 +317,10 @@ inline wxDateTime& wxDateTime::Substract(const wxTimeSpan& diff)
inline wxDateTime& wxDateTime::operator-=(const wxTimeSpan& diff) inline wxDateTime& wxDateTime::operator-=(const wxTimeSpan& diff)
{ {
return Substract(diff); return Subtract(diff);
} }
inline wxTimeSpan wxDateTime::Substract(const wxDateTime& datetime) const inline wxTimeSpan wxDateTime::Subtract(const wxDateTime& datetime) const
{ {
wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime")); wxASSERT_MSG( IsValid() && datetime.IsValid(), _T("invalid wxDateTime"));
@@ -332,19 +332,19 @@ inline wxDateTime wxDateTime::Add(const wxDateSpan& diff) const
return wxDateTime(*this).Add(diff); return wxDateTime(*this).Add(diff);
} }
inline wxDateTime& wxDateTime::Substract(const wxDateSpan& diff) inline wxDateTime& wxDateTime::Subtract(const wxDateSpan& diff)
{ {
return Add(diff.Negate()); return Add(diff.Negate());
} }
inline wxDateTime wxDateTime::Substract(const wxDateSpan& diff) const inline wxDateTime wxDateTime::Subtract(const wxDateSpan& diff) const
{ {
return wxDateTime(*this).Substract(diff); return wxDateTime(*this).Subtract(diff);
} }
inline wxDateTime& wxDateTime::operator-=(const wxDateSpan& diff) inline wxDateTime& wxDateTime::operator-=(const wxDateSpan& diff)
{ {
return Substract(diff); return Subtract(diff);
} }
inline wxDateTime& wxDateTime::operator+=(const wxDateSpan& diff) inline wxDateTime& wxDateTime::operator+=(const wxDateSpan& diff)
@@ -426,12 +426,12 @@ inline wxTimeSpan& wxTimeSpan::Add(const wxTimeSpan& diff)
return *this; return *this;
} }
inline wxTimeSpan wxTimeSpan::Substract(const wxTimeSpan& diff) const inline wxTimeSpan wxTimeSpan::Subtract(const wxTimeSpan& diff) const
{ {
return wxTimeSpan(m_diff - diff.GetValue()); return wxTimeSpan(m_diff - diff.GetValue());
} }
inline wxTimeSpan& wxTimeSpan::Substract(const wxTimeSpan& diff) inline wxTimeSpan& wxTimeSpan::Subtract(const wxTimeSpan& diff)
{ {
m_diff -= diff.GetValue(); m_diff -= diff.GetValue();