diff options
Diffstat (limited to 'source/base')
-rw-r--r-- | source/base/StarAnimatedPartSet.cpp | 8 | ||||
-rw-r--r-- | source/base/StarAssets.cpp | 30 | ||||
-rw-r--r-- | source/base/StarDirectoryAssetSource.cpp | 4 | ||||
-rw-r--r-- | source/base/StarMixer.cpp | 2 |
4 files changed, 22 insertions, 22 deletions
diff --git a/source/base/StarAnimatedPartSet.cpp b/source/base/StarAnimatedPartSet.cpp index 3f5d72a..9133921 100644 --- a/source/base/StarAnimatedPartSet.cpp +++ b/source/base/StarAnimatedPartSet.cpp @@ -27,7 +27,7 @@ AnimatedPartSet::AnimatedPartSet(Json config) { newState->transitionState = stateConfig.getString("transition", ""); newState->stateProperties = stateConfig.getObject("properties", {}); newState->stateFrameProperties = stateConfig.getObject("frameProperties", {}); - newStateType.states[stateName] = move(newState); + newStateType.states[stateName] = std::move(newState); } newStateType.states.sortByKey(); @@ -38,7 +38,7 @@ AnimatedPartSet::AnimatedPartSet(Json config) { if (newStateType.defaultState.empty() && !newStateType.states.empty()) newStateType.defaultState = newStateType.states.firstKey(); - m_stateTypes[stateTypeName] = move(newStateType); + m_stateTypes[stateTypeName] = std::move(newStateType); } // Sort state types by decreasing priority. @@ -61,13 +61,13 @@ AnimatedPartSet::AnimatedPartSet(Json config) { auto const& stateConfig = partStatePair.second; PartState partState = {stateConfig.getObject("properties", {}), stateConfig.getObject("frameProperties", {})}; - newPart.partStates[stateTypeName][stateName] = move(partState); + newPart.partStates[stateTypeName][stateName] = std::move(partState); } } newPart.activePart.partName = partPair.first; newPart.activePartDirty = true; - m_parts[partName] = move(newPart); + m_parts[partName] = std::move(newPart); } for (auto const& pair : m_stateTypes) diff --git a/source/base/StarAssets.cpp b/source/base/StarAssets.cpp index 8956ba9..135945c 100644 --- a/source/base/StarAssets.cpp +++ b/source/base/StarAssets.cpp @@ -71,17 +71,17 @@ Maybe<RectU> FramesSpecification::getRect(String const& frame) const { Assets::Assets(Settings settings, StringList assetSources) { const char* const AssetsPatchSuffix = ".patch"; - m_settings = move(settings); + m_settings = std::move(settings); m_stopThreads = false; - m_assetSources = move(assetSources); + m_assetSources = std::move(assetSources); for (auto& sourcePath : m_assetSources) { Logger::info("Loading assets from: '{}'", sourcePath); AssetSourcePtr source; if (File::isDirectory(sourcePath)) - source = make_shared<DirectoryAssetSource>(sourcePath, m_settings.pathIgnore); + source = std::make_shared<DirectoryAssetSource>(sourcePath, m_settings.pathIgnore); else - source = make_shared<PackedAssetSource>(sourcePath); + source = std::make_shared<PackedAssetSource>(sourcePath); m_assetSourcePaths.add(sourcePath, source); @@ -225,7 +225,7 @@ Json Assets::json(String const& path) const { auto components = AssetPath::split(path); validatePath(components, true, false); - return as<JsonData>(getAsset(AssetId{AssetType::Json, move(components)}))->json; + return as<JsonData>(getAsset(AssetId{AssetType::Json, std::move(components)}))->json; } Json Assets::fetchJson(Json const& v, String const& dir) const { @@ -255,7 +255,7 @@ void Assets::queueImages(StringList const& paths) const { auto components = AssetPath::split(path); validatePath(components, true, true); - return AssetId{AssetType::Image, move(components)}; + return AssetId{AssetType::Image, std::move(components)}; })); } @@ -280,7 +280,7 @@ AudioConstPtr Assets::audio(String const& path) const { auto components = AssetPath::split(path); validatePath(components, false, false); - return as<AudioData>(getAsset(AssetId{AssetType::Audio, move(components)}))->audio; + return as<AudioData>(getAsset(AssetId{AssetType::Audio, std::move(components)}))->audio; } void Assets::queueAudios(StringList const& paths) const { @@ -288,7 +288,7 @@ void Assets::queueAudios(StringList const& paths) const { const auto components = AssetPath::split(path); validatePath(components, false, false); - return AssetId{AssetType::Audio, move(components)}; + return AssetId{AssetType::Audio, std::move(components)}; })); } @@ -296,7 +296,7 @@ AudioConstPtr Assets::tryAudio(String const& path) const { auto components = AssetPath::split(path); validatePath(components, false, false); - if (auto audioData = as<AudioData>(tryAsset(AssetId{AssetType::Audio, move(components)}))) + if (auto audioData = as<AudioData>(tryAsset(AssetId{AssetType::Audio, std::move(components)}))) return audioData->audio; else return {}; @@ -306,14 +306,14 @@ FontConstPtr Assets::font(String const& path) const { auto components = AssetPath::split(path); validatePath(components, false, false); - return as<FontData>(getAsset(AssetId{AssetType::Font, move(components)}))->font; + return as<FontData>(getAsset(AssetId{AssetType::Font, std::move(components)}))->font; } ByteArrayConstPtr Assets::bytes(String const& path) const { auto components = AssetPath::split(path); validatePath(components, false, false); - return as<BytesData>(getAsset(AssetId{AssetType::Bytes, move(components)}))->bytes; + return as<BytesData>(getAsset(AssetId{AssetType::Bytes, std::move(components)}))->bytes; } IODevicePtr Assets::openFile(String const& path) const { @@ -386,7 +386,7 @@ bool Assets::BytesData::shouldPersist() const { FramesSpecification Assets::parseFramesSpecification(Json const& frameConfig, String path) { FramesSpecification framesSpecification; - framesSpecification.framesFile = move(path); + framesSpecification.framesFile = std::move(path); if (frameConfig.contains("frameList")) { for (auto const& pair : frameConfig.get("frameList").toObject()) { @@ -469,7 +469,7 @@ FramesSpecification Assets::parseFramesSpecification(Json const& frameConfig, St if (!framesSpecification.frames.contains(value)) throw AssetException(strf("No such frame '{}' found for alias '{}'", value, key)); - framesSpecification.aliases[key] = move(value); + framesSpecification.aliases[key] = std::move(value); } } @@ -866,7 +866,7 @@ shared_ptr<Assets::AssetData> Assets::loadImage(AssetPath const& path) const { for (auto const& ref : referencePaths) { auto components = AssetPath::split(ref); validatePath(components, true, false); - auto refImage = as<ImageData>(loadAsset(AssetId{AssetType::Image, move(components)})); + auto refImage = as<ImageData>(loadAsset(AssetId{AssetType::Image, std::move(components)})); if (!refImage) return {}; references[ref] = refImage->image; @@ -881,7 +881,7 @@ shared_ptr<Assets::AssetData> Assets::loadImage(AssetPath const& path) const { else processImageOperation(entry.operation, newImage, [&](String const& ref) { return references.get(ref).get(); }); }); - newData->image = make_shared<Image>(move(newImage)); + newData->image = make_shared<Image>(std::move(newImage)); return newData; }); diff --git a/source/base/StarDirectoryAssetSource.cpp b/source/base/StarDirectoryAssetSource.cpp index 675c64c..f375e4a 100644 --- a/source/base/StarDirectoryAssetSource.cpp +++ b/source/base/StarDirectoryAssetSource.cpp @@ -62,7 +62,7 @@ void DirectoryAssetSource::setMetadata(JsonObject metadata) { if (!m_metadataFile) m_metadataFile = String("/_metadata"); - m_metadata = move(metadata); + m_metadata = std::move(metadata); if (m_metadata.empty()) File::remove(toFilesystem(*m_metadataFile)); @@ -88,7 +88,7 @@ void DirectoryAssetSource::scanAll(String const& assetDirectory, StringList& out scanAll(assetPath + "/", output); } else { if (!shouldIgnore(assetPath)) - output.append(move(assetPath)); + output.append(std::move(assetPath)); } } } diff --git a/source/base/StarMixer.cpp b/source/base/StarMixer.cpp index d3c7c5a..be0bea8 100644 --- a/source/base/StarMixer.cpp +++ b/source/base/StarMixer.cpp @@ -218,7 +218,7 @@ void Mixer::setVolume(float volume, float rampTime) { void Mixer::play(AudioInstancePtr sample) { MutexLocker locker(m_queueMutex); - m_audios.add(move(sample), AudioState{List<float>(m_channels, 1.0f)}); + m_audios.add(std::move(sample), AudioState{List<float>(m_channels, 1.0f)}); } void Mixer::stopAll(float rampTime) { |