From a8db35736048b86fdfe5ec5b1bef385cb9b3a858 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sun, 3 Dec 2023 19:02:36 -0600 Subject: [PATCH] [ox/fs] Cleanup unnecessary constructors in FileAddress --- deps/ox/src/ox/fs/filesystem/filelocation.cpp | 7 ------- deps/ox/src/ox/fs/filesystem/filelocation.hpp | 6 ------ 2 files changed, 13 deletions(-) diff --git a/deps/ox/src/ox/fs/filesystem/filelocation.cpp b/deps/ox/src/ox/fs/filesystem/filelocation.cpp index b12cfd96d..d0ac59240 100644 --- a/deps/ox/src/ox/fs/filesystem/filelocation.cpp +++ b/deps/ox/src/ox/fs/filesystem/filelocation.cpp @@ -36,13 +36,6 @@ FileAddress::FileAddress(ox::CRStringView path) noexcept { m_type = FileAddressType::Path; } -FileAddress::FileAddress(char *path) noexcept { - auto pathSize = ox_strlen(path) + 1; - m_data.path = new char[pathSize]; - memcpy(m_data.path, path, pathSize); - m_type = FileAddressType::Path; -} - FileAddress &FileAddress::operator=(const FileAddress &other) noexcept { if (this == &other) { return *this; diff --git a/deps/ox/src/ox/fs/filesystem/filelocation.hpp b/deps/ox/src/ox/fs/filesystem/filelocation.hpp index c5f026b01..2c1edbd7f 100644 --- a/deps/ox/src/ox/fs/filesystem/filelocation.hpp +++ b/deps/ox/src/ox/fs/filesystem/filelocation.hpp @@ -59,12 +59,6 @@ class FileAddress { explicit FileAddress(CRStringView path) noexcept; - template - explicit FileAddress(const ox::BasicString &path) noexcept: FileAddress(StringView(path)) { - } - - explicit FileAddress(char *path) noexcept; - constexpr FileAddress(ox::StringLiteral path) noexcept; constexpr ~FileAddress() noexcept;