yeah these too

This commit is contained in:
2025-12-13 01:21:57 -05:00
parent 3be9f0746f
commit c77701fe72
41 changed files with 1391 additions and 872 deletions

View File

@@ -9,14 +9,14 @@ using namespace tinyxml2;
namespace anm2ed::anm2
{
Sound::Sound(const Sound& other) : path(other.path) { audio = path.empty() ? Audio() : Audio(path); }
Sound::Sound(const Sound& other) : path(other.path), audio(other.audio) {}
Sound& Sound::operator=(const Sound& other)
{
if (this != &other)
{
path = other.path;
audio = path.empty() ? Audio() : Audio(path);
audio = other.audio;
}
return *this;
}
@@ -33,7 +33,7 @@ namespace anm2ed::anm2
}
}
Sound::Sound(const std::string& directory, const std::string& path)
Sound::Sound(const std::filesystem::path& directory, const std::filesystem::path& path)
{
filesystem::WorkingDirectory workingDirectory(directory);
this->path = !path.empty() ? make_relative_or_keep(path) : this->path;
@@ -41,11 +41,6 @@ namespace anm2ed::anm2
audio = Audio(this->path);
}
Sound::Sound(const std::filesystem::path& directory, const std::filesystem::path& path)
: Sound(directory.string(), path.string())
{
}
Sound::Sound(XMLElement* element, int& id)
{
if (!element) return;