| @@ -189,9 +189,7 @@ MidiBuffer::Iterator::Iterator (const MidiBuffer& b) noexcept | |||||
| { | { | ||||
| } | } | ||||
| MidiBuffer::Iterator::~Iterator() noexcept | |||||
| { | |||||
| } | |||||
| MidiBuffer::Iterator::~Iterator() noexcept{} | |||||
| void MidiBuffer::Iterator::setNextSamplePosition (const int samplePosition) noexcept | void MidiBuffer::Iterator::setNextSamplePosition (const int samplePosition) noexcept | ||||
| { | { | ||||
| @@ -173,7 +173,10 @@ public: | |||||
| Iterator (const MidiBuffer&) noexcept; | Iterator (const MidiBuffer&) noexcept; | ||||
| /** Creates a copy of an iterator. */ | /** Creates a copy of an iterator. */ | ||||
| Iterator (const Iterator&) noexcept = default; | |||||
| Iterator (const Iterator&) = default; | |||||
| // VS2013 requires this, even if it's unused. | |||||
| Iterator& operator= (const Iterator&) = delete; | |||||
| /** Destructor. */ | /** Destructor. */ | ||||
| ~Iterator() noexcept; | ~Iterator() noexcept; | ||||
| @@ -38,12 +38,34 @@ class NormalisableRange | |||||
| { | { | ||||
| public: | public: | ||||
| /** Creates a continuous range that performs a dummy mapping. */ | /** Creates a continuous range that performs a dummy mapping. */ | ||||
| NormalisableRange() noexcept = default; | |||||
| NormalisableRange() noexcept {} | |||||
| NormalisableRange (const NormalisableRange&) = default; | NormalisableRange (const NormalisableRange&) = default; | ||||
| NormalisableRange (NormalisableRange&&) = default; | |||||
| NormalisableRange& operator= (const NormalisableRange&) = default; | NormalisableRange& operator= (const NormalisableRange&) = default; | ||||
| NormalisableRange& operator= (NormalisableRange&&) = default; | |||||
| // VS2013 can't default move constructors | |||||
| NormalisableRange (NormalisableRange&& other) | |||||
| : start (other.start), end (other.end), | |||||
| interval (other.interval), skew (other.skew), | |||||
| symmetricSkew (other.symmetricSkew), | |||||
| convertFrom0To1Function (static_cast<ConverstionFunction&&> (other.convertFrom0To1Function)), | |||||
| convertTo0To1Function (static_cast<ConverstionFunction&&> (other.convertTo0To1Function)), | |||||
| snapToLegalValueFunction (static_cast<ConverstionFunction&&> (other.snapToLegalValueFunction)) | |||||
| { | |||||
| } | |||||
| // VS2013 can't default move assignments | |||||
| NormalisableRange& operator= (NormalisableRange&& other) | |||||
| { | |||||
| start = other.start; | |||||
| end = other.end; | |||||
| interval = other.interval; | |||||
| skew = other.skew; | |||||
| symmetricSkew = other.symmetricSkew; | |||||
| convertFrom0To1Function = static_cast<ConverstionFunction&&> (other.convertFrom0To1Function); | |||||
| convertTo0To1Function = static_cast<ConverstionFunction&&> (other.convertTo0To1Function); | |||||
| snapToLegalValueFunction = static_cast<ConverstionFunction&&> (other.snapToLegalValueFunction); | |||||
| } | |||||
| /** Creates a NormalisableRange with a given range, interval and skew factor. */ | /** Creates a NormalisableRange with a given range, interval and skew factor. */ | ||||
| NormalisableRange (ValueType rangeStart, | NormalisableRange (ValueType rangeStart, | ||||
| @@ -235,9 +257,10 @@ private: | |||||
| jassert (skew > ValueType()); | jassert (skew > ValueType()); | ||||
| } | } | ||||
| std::function<ValueType (ValueType, ValueType, ValueType)> convertFrom0To1Function = {}, | |||||
| convertTo0To1Function = {}, | |||||
| snapToLegalValueFunction = {}; | |||||
| typedef std::function<ValueType(ValueType, ValueType, ValueType)> ConverstionFunction; | |||||
| ConverstionFunction convertFrom0To1Function = {}, | |||||
| convertTo0To1Function = {}, | |||||
| snapToLegalValueFunction = {}; | |||||
| }; | }; | ||||
| } // namespace juce | } // namespace juce | ||||
| @@ -134,9 +134,7 @@ URL::DownloadTask::DownloadTask() {} | |||||
| URL::DownloadTask::~DownloadTask() {} | URL::DownloadTask::~DownloadTask() {} | ||||
| //============================================================================== | //============================================================================== | ||||
| URL::URL() noexcept | |||||
| { | |||||
| } | |||||
| URL::URL() noexcept {} | |||||
| URL::URL (const String& u) : url (u) | URL::URL (const String& u) : url (u) | ||||
| { | { | ||||
| @@ -170,6 +168,28 @@ URL::URL (const String& u) : url (u) | |||||
| URL::URL (const String& u, int) : url (u) {} | URL::URL (const String& u, int) : url (u) {} | ||||
| URL::URL (URL&& other) | |||||
| : url (static_cast<String&&> (other.url)), | |||||
| postData (static_cast<MemoryBlock&&> (other.postData)), | |||||
| parameterNames (static_cast<StringArray&&> (other.parameterNames)), | |||||
| parameterValues (static_cast<StringArray&&> (other.parameterValues)), | |||||
| filesToUpload (static_cast<ReferenceCountedArray<Upload>&&> (other.filesToUpload)) | |||||
| { | |||||
| } | |||||
| URL& URL::operator= (URL&& other) | |||||
| { | |||||
| url = static_cast<String&&> (other.url); | |||||
| postData = static_cast<MemoryBlock&&> (other.postData); | |||||
| parameterNames = static_cast<StringArray&&> (other.parameterNames); | |||||
| parameterValues = static_cast<StringArray&&> (other.parameterValues); | |||||
| filesToUpload = static_cast<ReferenceCountedArray<Upload>&&> (other.filesToUpload); | |||||
| return *this; | |||||
| } | |||||
| URL::~URL() {} | |||||
| URL URL::createWithoutParsing (const String& u) | URL URL::createWithoutParsing (const String& u) | ||||
| { | { | ||||
| return URL (u, 0); | return URL (u, 0); | ||||
| @@ -189,10 +209,6 @@ bool URL::operator!= (const URL& other) const | |||||
| return ! operator== (other); | return ! operator== (other); | ||||
| } | } | ||||
| URL::~URL() | |||||
| { | |||||
| } | |||||
| namespace URLHelpers | namespace URLHelpers | ||||
| { | { | ||||
| static String getMangledParameters (const URL& url) | static String getMangledParameters (const URL& url) | ||||
| @@ -47,9 +47,11 @@ public: | |||||
| URL (const String& url); | URL (const String& url); | ||||
| URL (const URL&) = default; | URL (const URL&) = default; | ||||
| URL (URL&&) = default; | |||||
| URL& operator= (const URL&) = default; | URL& operator= (const URL&) = default; | ||||
| URL& operator= (URL&&) = default; | |||||
| // VS2013 can't default move constructors and assignments | |||||
| URL (URL&&); | |||||
| URL& operator= (URL&&); | |||||
| /** Destructor. */ | /** Destructor. */ | ||||
| ~URL(); | ~URL(); | ||||
| @@ -1359,8 +1359,6 @@ struct StringCreationHelper | |||||
| dest.write (c); | dest.write (c); | ||||
| } | } | ||||
| String&& get() noexcept { return static_cast<String&&> (result); } | |||||
| String result; | String result; | ||||
| String::CharPointerType source { nullptr }, dest { nullptr }; | String::CharPointerType source { nullptr }, dest { nullptr }; | ||||
| size_t allocatedBytes, bytesWritten = 0; | size_t allocatedBytes, bytesWritten = 0; | ||||
| @@ -1386,7 +1384,7 @@ String String::replaceCharacter (const juce_wchar charToReplace, const juce_wcha | |||||
| break; | break; | ||||
| } | } | ||||
| return builder.get(); | |||||
| return static_cast<String&&> (builder.result); | |||||
| } | } | ||||
| String String::replaceCharacters (StringRef charactersToReplace, StringRef charactersToInsertInstead) const | String String::replaceCharacters (StringRef charactersToReplace, StringRef charactersToInsertInstead) const | ||||
| @@ -1411,7 +1409,7 @@ String String::replaceCharacters (StringRef charactersToReplace, StringRef chara | |||||
| break; | break; | ||||
| } | } | ||||
| return builder.get(); | |||||
| return static_cast<String&&> (builder.result); | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -1493,7 +1491,7 @@ String String::toUpperCase() const | |||||
| ++(builder.source); | ++(builder.source); | ||||
| } | } | ||||
| return builder.get(); | |||||
| return static_cast<String&&> (builder.result); | |||||
| } | } | ||||
| String String::toLowerCase() const | String String::toLowerCase() const | ||||
| @@ -1511,7 +1509,7 @@ String String::toLowerCase() const | |||||
| ++(builder.source); | ++(builder.source); | ||||
| } | } | ||||
| return builder.get(); | |||||
| return static_cast<String&&> (builder.result); | |||||
| } | } | ||||
| //============================================================================== | //============================================================================== | ||||
| @@ -1776,7 +1774,7 @@ String String::retainCharacters (StringRef charactersToRetain) const | |||||
| } | } | ||||
| builder.write (0); | builder.write (0); | ||||
| return builder.get(); | |||||
| return static_cast<String&&> (builder.result); | |||||
| } | } | ||||
| String String::removeCharacters (StringRef charactersToRemove) const | String String::removeCharacters (StringRef charactersToRemove) const | ||||
| @@ -1797,7 +1795,7 @@ String String::removeCharacters (StringRef charactersToRemove) const | |||||
| break; | break; | ||||
| } | } | ||||
| return builder.get(); | |||||
| return static_cast<String&&> (builder.result); | |||||
| } | } | ||||
| String String::initialSectionContainingOnly (StringRef permittedCharacters) const | String String::initialSectionContainingOnly (StringRef permittedCharacters) const | ||||
| @@ -2013,7 +2011,7 @@ String String::createStringFromData (const void* const unknownData, int size) | |||||
| } | } | ||||
| builder.write (0); | builder.write (0); | ||||
| return builder.get(); | |||||
| return static_cast<String&&> (builder.result); | |||||
| } | } | ||||
| auto* start = (const char*) data; | auto* start = (const char*) data; | ||||
| @@ -39,6 +39,26 @@ PositionedGlyph::PositionedGlyph (const Font& font_, juce_wchar character_, int | |||||
| { | { | ||||
| } | } | ||||
| PositionedGlyph::PositionedGlyph (PositionedGlyph&& other) noexcept | |||||
| : font (static_cast<Font&&> (other.font)), | |||||
| character (other.character), glyph (other.glyph), | |||||
| x (other.x), y (other.y), w (other.w), whitespace (other.whitespace) | |||||
| { | |||||
| } | |||||
| PositionedGlyph& PositionedGlyph::operator= (PositionedGlyph&& other) noexcept | |||||
| { | |||||
| font = static_cast<Font&&> (other.font); | |||||
| character = other.character; | |||||
| glyph = other.glyph; | |||||
| x = other.x; | |||||
| y = other.y; | |||||
| w = other.w; | |||||
| whitespace = other.whitespace; | |||||
| return *this; | |||||
| } | |||||
| PositionedGlyph::~PositionedGlyph() {} | PositionedGlyph::~PositionedGlyph() {} | ||||
| static inline void drawGlyphWithFont (Graphics& g, int glyph, const Font& font, AffineTransform t) | static inline void drawGlyphWithFont (Graphics& g, int glyph, const Font& font, AffineTransform t) | ||||
| @@ -108,10 +128,20 @@ GlyphArrangement::GlyphArrangement() | |||||
| glyphs.ensureStorageAllocated (128); | glyphs.ensureStorageAllocated (128); | ||||
| } | } | ||||
| GlyphArrangement::~GlyphArrangement() | |||||
| GlyphArrangement::GlyphArrangement (GlyphArrangement&& other) | |||||
| : glyphs (static_cast<Array<PositionedGlyph>&&> (other.glyphs)) | |||||
| { | |||||
| } | |||||
| GlyphArrangement& GlyphArrangement::operator= (GlyphArrangement&& other) | |||||
| { | { | ||||
| glyphs = static_cast<Array<PositionedGlyph>&&> (other.glyphs); | |||||
| return *this; | |||||
| } | } | ||||
| GlyphArrangement::~GlyphArrangement() {} | |||||
| //============================================================================== | //============================================================================== | ||||
| void GlyphArrangement::clear() | void GlyphArrangement::clear() | ||||
| { | { | ||||
| @@ -42,15 +42,18 @@ class JUCE_API PositionedGlyph final | |||||
| public: | public: | ||||
| //============================================================================== | //============================================================================== | ||||
| PositionedGlyph() noexcept; | PositionedGlyph() noexcept; | ||||
| ~PositionedGlyph(); | |||||
| PositionedGlyph (const Font& font, juce_wchar character, int glyphNumber, | PositionedGlyph (const Font& font, juce_wchar character, int glyphNumber, | ||||
| float anchorX, float baselineY, float width, bool isWhitespace); | float anchorX, float baselineY, float width, bool isWhitespace); | ||||
| PositionedGlyph (const PositionedGlyph&) = default; | PositionedGlyph (const PositionedGlyph&) = default; | ||||
| PositionedGlyph (PositionedGlyph&&) noexcept = default; | |||||
| PositionedGlyph& operator= (const PositionedGlyph&) = default; | PositionedGlyph& operator= (const PositionedGlyph&) = default; | ||||
| PositionedGlyph& operator= (PositionedGlyph&&) noexcept = default; | |||||
| // VS2013 can't default move constructors and assignmants | |||||
| PositionedGlyph (PositionedGlyph&&) noexcept; | |||||
| PositionedGlyph& operator= (PositionedGlyph&&) noexcept; | |||||
| ~PositionedGlyph(); | |||||
| /** Returns the character the glyph represents. */ | /** Returns the character the glyph represents. */ | ||||
| juce_wchar getCharacter() const noexcept { return character; } | juce_wchar getCharacter() const noexcept { return character; } | ||||
| @@ -124,9 +127,11 @@ public: | |||||
| GlyphArrangement(); | GlyphArrangement(); | ||||
| GlyphArrangement (const GlyphArrangement&) = default; | GlyphArrangement (const GlyphArrangement&) = default; | ||||
| GlyphArrangement (GlyphArrangement&&) = default; | |||||
| GlyphArrangement& operator= (const GlyphArrangement&) = default; | GlyphArrangement& operator= (const GlyphArrangement&) = default; | ||||
| GlyphArrangement& operator= (GlyphArrangement&&) = default; | |||||
| // VS2013 can't default move constructors and assignmants | |||||
| GlyphArrangement (GlyphArrangement&&); | |||||
| GlyphArrangement& operator= (GlyphArrangement&&); | |||||
| /** Destructor. */ | /** Destructor. */ | ||||
| ~GlyphArrangement(); | ~GlyphArrangement(); | ||||
| @@ -82,12 +82,22 @@ private: | |||||
| struct TouchInfo | struct TouchInfo | ||||
| { | { | ||||
| TouchInfo() noexcept : touchId (0), owner (nullptr) {} | TouchInfo() noexcept : touchId (0), owner (nullptr) {} | ||||
| TouchInfo (IDType idToUse, ComponentPeer* peer) noexcept : touchId (idToUse), owner (peer) {} | |||||
| TouchInfo (const TouchInfo&) noexcept = default; | |||||
| TouchInfo (TouchInfo&&) noexcept = default; | |||||
| TouchInfo (IDType idToUse, ComponentPeer* peer) noexcept : touchId (idToUse), owner (peer) {} | |||||
| TouchInfo& operator= (const TouchInfo&) noexcept = default; | |||||
| TouchInfo& operator= (TouchInfo&&) noexcept = default; | |||||
| TouchInfo (const TouchInfo&) = default; | |||||
| TouchInfo& operator= (const TouchInfo&) = default; | |||||
| // VS2013 can't default move constructors | |||||
| TouchInfo (TouchInfo&& other) noexcept : touchId (other.touchId), owner (other.owner) {} | |||||
| // VS2013 can't default move assignments | |||||
| TouchInfo& operator= (TouchInfo&& other) noexcept | |||||
| { | |||||
| touchId = other.touchId; | |||||
| owner = other.owner; | |||||
| return *this; | |||||
| } | |||||
| IDType touchId; | IDType touchId; | ||||
| ComponentPeer* owner; | ComponentPeer* owner; | ||||
| @@ -74,7 +74,15 @@ public: | |||||
| } | } | ||||
| UniformTextSection (const UniformTextSection&) = default; | UniformTextSection (const UniformTextSection&) = default; | ||||
| UniformTextSection (UniformTextSection&&) = default; | |||||
| // VS2013 can't default move constructors | |||||
| UniformTextSection (UniformTextSection&& other) | |||||
| : font (static_cast<Font&&> (other.font)), | |||||
| colour (other.colour), | |||||
| atoms (static_cast<Array<TextAtom>&&> (other.atoms)) | |||||
| { | |||||
| } | |||||
| UniformTextSection& operator= (const UniformTextSection&) = delete; | UniformTextSection& operator= (const UniformTextSection&) = delete; | ||||
| void append (UniformTextSection& other, const juce_wchar passwordChar) | void append (UniformTextSection& other, const juce_wchar passwordChar) | ||||
| @@ -126,13 +126,9 @@ public: | |||||
| }; | }; | ||||
| //============================================================================== | //============================================================================== | ||||
| CodeDocument::Iterator::Iterator (const CodeDocument& doc) noexcept : document (&doc) | |||||
| { | |||||
| } | |||||
| CodeDocument::Iterator::Iterator (const CodeDocument& doc) noexcept : document (&doc) {} | |||||
| CodeDocument::Iterator::~Iterator() noexcept | |||||
| { | |||||
| } | |||||
| CodeDocument::Iterator::~Iterator() noexcept {} | |||||
| juce_wchar CodeDocument::Iterator::nextChar() noexcept | juce_wchar CodeDocument::Iterator::nextChar() noexcept | ||||
| { | { | ||||
| @@ -357,8 +357,8 @@ public: | |||||
| { | { | ||||
| public: | public: | ||||
| Iterator (const CodeDocument& document) noexcept; | Iterator (const CodeDocument& document) noexcept; | ||||
| Iterator (const Iterator&) noexcept = default; | |||||
| Iterator& operator= (const Iterator&) noexcept = default; | |||||
| Iterator (const Iterator&) = default; | |||||
| Iterator& operator= (const Iterator&) = default; | |||||
| ~Iterator() noexcept; | ~Iterator() noexcept; | ||||
| /** Reads the next character and returns it. | /** Reads the next character and returns it. | ||||