upgrade to JUCE 5.4.3. Remove (probably) unused JUCE modules. Remove VST2 target (it's been end-of-life'd by Steinberg and by JUCE)
This commit is contained in:
@ -94,11 +94,11 @@ namespace TimeHelpers
|
||||
static inline String formatString (const String& format, const std::tm* const tm)
|
||||
{
|
||||
#if JUCE_ANDROID
|
||||
typedef CharPointer_UTF8 StringType;
|
||||
using StringType = CharPointer_UTF8;
|
||||
#elif JUCE_WINDOWS
|
||||
typedef CharPointer_UTF16 StringType;
|
||||
using StringType = CharPointer_UTF16;
|
||||
#else
|
||||
typedef CharPointer_UTF32 StringType;
|
||||
using StringType = CharPointer_UTF32;
|
||||
#endif
|
||||
|
||||
#ifdef JUCE_MSVC
|
||||
@ -159,7 +159,7 @@ namespace TimeHelpers
|
||||
}
|
||||
else if (month < 0)
|
||||
{
|
||||
const int numYears = (11 - month) / 12;
|
||||
auto numYears = (11 - month) / 12;
|
||||
year -= numYears;
|
||||
month += 12 * numYears;
|
||||
}
|
||||
@ -181,17 +181,7 @@ namespace TimeHelpers
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
Time::Time() noexcept : millisSinceEpoch (0)
|
||||
{
|
||||
}
|
||||
|
||||
Time::Time (const Time& other) noexcept : millisSinceEpoch (other.millisSinceEpoch)
|
||||
{
|
||||
}
|
||||
|
||||
Time::Time (int64 ms) noexcept : millisSinceEpoch (ms)
|
||||
{
|
||||
}
|
||||
Time::Time (int64 ms) noexcept : millisSinceEpoch (ms) {}
|
||||
|
||||
Time::Time (int year, int month, int day,
|
||||
int hours, int minutes, int seconds, int milliseconds,
|
||||
@ -211,16 +201,6 @@ Time::Time (int year, int month, int day,
|
||||
+ milliseconds;
|
||||
}
|
||||
|
||||
Time::~Time() noexcept
|
||||
{
|
||||
}
|
||||
|
||||
Time& Time::operator= (const Time& other) noexcept
|
||||
{
|
||||
millisSinceEpoch = other.millisSinceEpoch;
|
||||
return *this;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
int64 Time::currentTimeMillis() noexcept
|
||||
{
|
||||
@ -306,10 +286,10 @@ int64 Time::secondsToHighResolutionTicks (const double seconds) noexcept
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
String Time::toString (const bool includeDate,
|
||||
const bool includeTime,
|
||||
const bool includeSeconds,
|
||||
const bool use24HourClock) const noexcept
|
||||
String Time::toString (bool includeDate,
|
||||
bool includeTime,
|
||||
bool includeSeconds,
|
||||
bool use24HourClock) const
|
||||
{
|
||||
String result;
|
||||
|
||||
@ -380,7 +360,7 @@ bool Time::isDaylightSavingTime() const noexcept
|
||||
return TimeHelpers::millisToLocal (millisSinceEpoch).tm_isdst != 0;
|
||||
}
|
||||
|
||||
String Time::getTimeZone() const noexcept
|
||||
String Time::getTimeZone() const
|
||||
{
|
||||
String zone[2];
|
||||
|
||||
@ -392,7 +372,7 @@ String Time::getTimeZone() const noexcept
|
||||
{
|
||||
char name[128] = { 0 };
|
||||
size_t length;
|
||||
_get_tzname (&length, name, 127, i);
|
||||
_get_tzname (&length, name, sizeof (name) - 1, i);
|
||||
zone[i] = name;
|
||||
}
|
||||
#else
|
||||
@ -426,9 +406,9 @@ int Time::getUTCOffsetSeconds() const noexcept
|
||||
|
||||
String Time::getUTCOffsetString (bool includeSemiColon) const
|
||||
{
|
||||
if (int seconds = getUTCOffsetSeconds())
|
||||
if (auto seconds = getUTCOffsetSeconds())
|
||||
{
|
||||
const int minutes = seconds / 60;
|
||||
auto minutes = seconds / 60;
|
||||
|
||||
return String::formatted (includeSemiColon ? "%+03d:%02d"
|
||||
: "%+03d%02d",
|
||||
@ -458,7 +438,7 @@ static int parseFixedSizeIntAndSkip (String::CharPointerType& t, int numChars, c
|
||||
|
||||
for (int i = numChars; --i >= 0;)
|
||||
{
|
||||
const int digit = (int) (*t - '0');
|
||||
auto digit = (int) (*t - '0');
|
||||
|
||||
if (! isPositiveAndBelow (digit, 10))
|
||||
return -1;
|
||||
@ -473,7 +453,7 @@ static int parseFixedSizeIntAndSkip (String::CharPointerType& t, int numChars, c
|
||||
return n;
|
||||
}
|
||||
|
||||
Time Time::fromISO8601 (StringRef iso) noexcept
|
||||
Time Time::fromISO8601 (StringRef iso)
|
||||
{
|
||||
auto t = iso.text;
|
||||
auto year = parseFixedSizeIntAndSkip (t, 4, '-');
|
||||
@ -596,7 +576,7 @@ bool operator> (Time time1, Time time2) noexcept { return time1.toMillisec
|
||||
bool operator<= (Time time1, Time time2) noexcept { return time1.toMilliseconds() <= time2.toMilliseconds(); }
|
||||
bool operator>= (Time time1, Time time2) noexcept { return time1.toMilliseconds() >= time2.toMilliseconds(); }
|
||||
|
||||
static int getMonthNumberForCompileDate (const String& m) noexcept
|
||||
static int getMonthNumberForCompileDate (const String& m)
|
||||
{
|
||||
for (int i = 0; i < 12; ++i)
|
||||
if (m.equalsIgnoreCase (shortMonthNames[i]))
|
||||
|
@ -38,18 +38,14 @@ class JUCE_API Time
|
||||
public:
|
||||
//==============================================================================
|
||||
/** Creates a Time object.
|
||||
|
||||
This default constructor creates a time of midnight Jan 1st 1970 UTC, (which is
|
||||
represented internally as 0ms).
|
||||
|
||||
To create a time object representing the current time, use getCurrentTime().
|
||||
|
||||
@see getCurrentTime
|
||||
*/
|
||||
Time() noexcept;
|
||||
Time() = default;
|
||||
|
||||
/** Creates a time based on a number of milliseconds.
|
||||
|
||||
To create a time object set to the current time, use getCurrentTime().
|
||||
|
||||
@param millisecondsSinceEpoch the number of milliseconds since the unix
|
||||
@ -79,14 +75,10 @@ public:
|
||||
int milliseconds = 0,
|
||||
bool useLocalTime = true) noexcept;
|
||||
|
||||
/** Creates a copy of another Time object. */
|
||||
Time (const Time& other) noexcept;
|
||||
Time (const Time&) = default;
|
||||
~Time() = default;
|
||||
|
||||
/** Destructor. */
|
||||
~Time() noexcept;
|
||||
|
||||
/** Copies this time from another one. */
|
||||
Time& operator= (const Time& other) noexcept;
|
||||
Time& operator= (const Time&) = default;
|
||||
|
||||
//==============================================================================
|
||||
/** Returns a Time object that is set to the current system time.
|
||||
@ -183,7 +175,7 @@ public:
|
||||
|
||||
//==============================================================================
|
||||
/** Returns a 3-character string to indicate the local timezone. */
|
||||
String getTimeZone() const noexcept;
|
||||
String getTimeZone() const;
|
||||
|
||||
/** Returns the local timezone offset from UTC in seconds. */
|
||||
int getUTCOffsetSeconds() const noexcept;
|
||||
@ -210,7 +202,7 @@ public:
|
||||
String toString (bool includeDate,
|
||||
bool includeTime,
|
||||
bool includeSeconds = true,
|
||||
bool use24HourClock = false) const noexcept;
|
||||
bool use24HourClock = false) const;
|
||||
|
||||
/** Converts this date/time to a string with a user-defined format.
|
||||
|
||||
@ -255,7 +247,7 @@ public:
|
||||
String toISO8601 (bool includeDividerCharacters) const;
|
||||
|
||||
/** Parses an ISO-8601 string and returns it as a Time. */
|
||||
static Time fromISO8601 (StringRef iso8601) noexcept;
|
||||
static Time fromISO8601 (StringRef iso8601);
|
||||
|
||||
//==============================================================================
|
||||
/** Adds a RelativeTime to this time. */
|
||||
@ -379,7 +371,7 @@ public:
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
int64 millisSinceEpoch;
|
||||
int64 millisSinceEpoch = 0;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
Reference in New Issue
Block a user