Moved deprecated attr at beginning of functions

This commit is contained in:
Vladyslav Baranovskyi
2025-02-11 17:34:12 +02:00
parent e976515d82
commit 3c7a883ee8
25 changed files with 49 additions and 47 deletions

View File

@@ -121,7 +121,7 @@ namespace OpenVulkano::AR
* If path is changed after starting the recording, the already running recording will be moved to the new path.
* @param path The path to be used to store the recording
*/
void SetRecordingPath(const std::string& path) [[deprecated]]
[[deprecated]] void SetRecordingPath(const std::string& path)
{
std::filesystem::path p(path);
SetRecordingPath(p);

View File

@@ -114,7 +114,7 @@ namespace OpenVulkano::AR
* @param autoAdvance If set to true the playback will advance based on the stored timestamps. If set to false it will only advance if a new frame is requested.
* @return ArCreateResult about the status of the AR session creation. The session pointer will always be nullptr unless the status is SUCCESS.
*/
[[nodiscard]] static ArCreateResult CreatePlayback(const std::string& recordingPath, bool autoAdvance = true, bool loadImages = true, bool loadDepth = true) [[deprecated]];
[[nodiscard]] [[deprecated]] static ArCreateResult CreatePlayback(const std::string& recordingPath, bool autoAdvance = true, bool loadImages = true, bool loadDepth = true);
/**
* Creates a network streamed AR session. nullptr if failed to create session for given address. This will block till the connection with the remote host has been established.

View File

@@ -60,8 +60,8 @@ namespace OpenVulkano::AR
static bool DirHasMetadata(const std::filesystem::path& dirPath);
static ArSessionMetadata FromXML(const std::string& filePath) [[deprecated]];
[[deprecated]] static ArSessionMetadata FromXML(const std::string& filePath);
static ArSessionMetadata FromYaml(const std::string& filePath) [[deprecated]];
[[deprecated]] static ArSessionMetadata FromYaml(const std::string& filePath);
};
}

View File

@@ -47,7 +47,7 @@ namespace OpenVulkano::AR::Playback
size_t m_imgTotalSize = 0, m_imgReadSize = 0;
public:
ArPlaybackReader(const std::string& recDir) [[deprecated]]
[[deprecated]] ArPlaybackReader(const std::string& recDir)
{
std::string extensions = R"((_\d+|\.part\d+)?)" + std::string(TAR_EXTENSIONS_REGEX);
m_archiveMetadata.Open(recDir, ".*meta(data)?" + extensions);

View File

@@ -15,7 +15,7 @@ namespace OpenVulkano::AR::Playback
class ArSessionPlayback final : public ArSession, public std::enable_shared_from_this<ArSessionPlayback>
{
public:
ArSessionPlayback(const std::string& recordingPath, bool autoAdvance, bool loadImages, bool loadDepth); [[deprecated]]
[[deprecated]] ArSessionPlayback(const std::string& recordingPath, bool autoAdvance, bool loadImages, bool loadDepth);
~ArSessionPlayback() override;

View File

@@ -34,7 +34,7 @@ namespace OpenVulkano
static Ptr PERF;
static Ptr APP;
static void SetupLogger(std::string logFolder = "", const std::string& logFile = "openVulkano.log", bool handleSignals = false) [[deprecated]];
[[deprecated]] static void SetupLogger(std::string logFolder = "", const std::string& logFile = "openVulkano.log", bool handleSignals = false);
/**
* \brief Creates a new custom logger that writes to the main log file.

View File

@@ -16,7 +16,7 @@ namespace OpenVulkano
class ExeAppendedZipResourceLoader : public ResourceLoader
{
public:
std::string GetResourcePath(const std::string& resourceName) [[deprecated]] final { return ""; }
[[deprecated]] std::string GetResourcePath(const std::string& resourceName) final { return ""; }
Array<char> GetResource(const std::string& resourceName) override;
protected:
virtual std::string GetCurrentExecutablePath() const = 0;

View File

@@ -19,7 +19,7 @@ namespace OpenVulkano
[[nodiscard]] virtual Array<char> GetResource(const std::string& resourceName) = 0;
[[nodiscard]] virtual std::string GetResourcePath(const std::string& resourceName) [[deprecated]] { return ""; }
[[nodiscard]] [[deprecated]] virtual std::string GetResourcePath(const std::string& resourceName) { return ""; }
static ResourceLoader& GetInstance();

View File

@@ -14,7 +14,7 @@ namespace OpenVulkano
class SystemFontResolver
{
public:
static const std::string& GetSystemFontPath(const std::string& fontName) [[deprecated]];
[[deprecated]] static const std::string& GetSystemFontPath(const std::string& fontName);
private:
static std::map<std::string, std::string> ReadSystemFonts();

View File

@@ -13,7 +13,7 @@ namespace OpenVulkano
class ResourceLoaderAppDirWindows final : public ResourceLoader
{
public:
std::string GetResourcePath(const std::string& resourceName) [[deprecated]] override;
[[deprecated]] std::string GetResourcePath(const std::string& resourceName) override;
Array<char> GetResource(const std::string& resourceName) override;
};
}

View File

@@ -30,7 +30,7 @@ namespace OpenVulkano
void CheckSize(size_t size);
public:
MultiPartArchiveWriter(const std::string& dir, const std::string& fileNamePattern, const ArchiveConfiguration& archiveConfiguration, size_t sizeLimit = 2_GiB, bool lazyCreation = false, const std::shared_ptr<spdlog::logger>& logger = nullptr) [[deprecated]];
[[deprecated]] MultiPartArchiveWriter(const std::string& dir, const std::string& fileNamePattern, const ArchiveConfiguration& archiveConfiguration, size_t sizeLimit = 2_GiB, bool lazyCreation = false, const std::shared_ptr<spdlog::logger>& logger = nullptr);
~MultiPartArchiveWriter() override;

View File

@@ -19,10 +19,10 @@ namespace OpenVulkano::Image
virtual ~IImageLoader() = default;
static std::unique_ptr<Image> loadData(const uint8_t* data, int size, int desiredChannels = 0);
virtual std::unique_ptr<Image> loadFromFile(const std::string& filePath) [[deprecated]] = 0;
[[deprecated]] virtual std::unique_ptr<Image> loadFromFile(const std::string& filePath) = 0;
virtual std::unique_ptr<Image> loadFromMemory(const std::vector<uint8_t>& buffer) = 0;
virtual Math::Vector2i GetImageDimensions(const std::string& filename) [[deprecated]] = 0;
[[deprecated]] virtual Math::Vector2i GetImageDimensions(const std::string& filename) = 0;
protected:
static Math::Vector2i GetDimensionsInternal(const std::string& filename) [[deprecated]];
[[deprecated]] static Math::Vector2i GetDimensionsInternal(const std::string& filename);
};
}

View File

@@ -18,9 +18,9 @@ namespace OpenVulkano::Image
class ImageLoaderDds : public IImageLoader
{
public:
std::unique_ptr<Image> loadFromFile(const std::string& filePath) [[deprecated]] override;
[[deprecated]] std::unique_ptr<Image> loadFromFile(const std::string& filePath) override;
std::unique_ptr<Image> loadFromMemory(const std::vector<uint8_t>& buffer) override;
Math::Vector2i GetImageDimensions(const std::string& filename) [[deprecated]] override;
[[deprecated]] Math::Vector2i GetImageDimensions(const std::string& filename) override;
protected:
std::unique_ptr<Image> ExtractImage(dds::Image* ddsImage);

View File

@@ -13,9 +13,9 @@ namespace OpenVulkano::Image
class ImageLoaderJpeg : public IImageLoader
{
public:
std::unique_ptr<Image> loadFromFile(const std::string& filePath) [[deprecated]] override;
[[deprecated]] std::unique_ptr<Image> loadFromFile(const std::string& filePath) override;
std::unique_ptr<Image> loadFromMemory(const std::vector<uint8_t>& buffer) override;
Math::Vector2i GetImageDimensions(const std::string& filename) [[deprecated]] override;
[[deprecated]] Math::Vector2i GetImageDimensions(const std::string& filename) override;
private:
std::unique_ptr<Image> loadJpeg(const uint8_t* data, size_t size);
};

View File

@@ -13,8 +13,8 @@ namespace OpenVulkano::Image
class ImageLoaderKtx : public IImageLoader
{
public:
std::unique_ptr<Image> loadFromFile(const std::string& filePath) [[deprecated]] override;
[[deprecated]] std::unique_ptr<Image> loadFromFile(const std::string& filePath) override;
std::unique_ptr<Image> loadFromMemory(const std::vector<uint8_t>& buffer) override;
Math::Vector2i GetImageDimensions(const std::string& filename) [[deprecated]] override;
[[deprecated]] Math::Vector2i GetImageDimensions(const std::string& filename) override;
};
}

View File

@@ -13,8 +13,8 @@ namespace OpenVulkano::Image
class ImageLoaderPfm : public IImageLoader
{
public:
std::unique_ptr<Image> loadFromFile(const std::string& filePath) [[deprecated]] override;
[[deprecated]] std::unique_ptr<Image> loadFromFile(const std::string& filePath) override;
std::unique_ptr<Image> loadFromMemory(const std::vector<uint8_t>& buffer) override;
Math::Vector2i GetImageDimensions(const std::string& filename) [[deprecated]] override;
[[deprecated]] Math::Vector2i GetImageDimensions(const std::string& filename) override;
};
}

View File

@@ -13,8 +13,8 @@ namespace OpenVulkano::Image
class ImageLoaderPng : public IImageLoader
{
public:
std::unique_ptr<Image> loadFromFile(const std::string& filePath) [[deprecated]] override;
[[deprecated]] std::unique_ptr<Image> loadFromFile(const std::string& filePath) override;
std::unique_ptr<Image> loadFromMemory(const std::vector<uint8_t>& buffer) override;
Math::Vector2i GetImageDimensions(const std::string& filename) [[deprecated]] override;
[[deprecated]] Math::Vector2i GetImageDimensions(const std::string& filename) override;
};
}

View File

@@ -12,8 +12,8 @@ namespace OpenVulkano::Image
class ImageLoaderPnm : public IImageLoader
{
public:
std::unique_ptr<Image> loadFromFile(const std::string& filePath) [[deprecated]] override;
[[deprecated]] std::unique_ptr<Image> loadFromFile(const std::string& filePath) override;
std::unique_ptr<Image> loadFromMemory(const std::vector<uint8_t>& buffer) override;
Math::Vector2i GetImageDimensions(const std::string& filename) [[deprecated]] override;
[[deprecated]] Math::Vector2i GetImageDimensions(const std::string& filename) override;
};
}

View File

@@ -14,11 +14,11 @@ namespace OpenVulkano::Scene
class MeshWriter
{
public:
static void WriteAsOBJ(Geometry* geometry, const std::string& filePath) [[deprecated]];
static void WriteAsUSD(Geometry* geometry, const std::string& filePath) [[deprecated]];
static void WriteObjAsZip(Geometry* geometry, const std::string& texturePath, const std::string& zipPath) [[deprecated]];
static void WriteAsUSDZ(Geometry* geometry, const std::string& texturePath, const std::string& usdzPath) [[deprecated]];
static void WriteAsFBX(Geometry* geometry, const std::string& texturePath, const std::string& fbxPath) [[deprecated]];
static void WriteAsSTL(Geometry* geometry, const std::string& filePath, bool binary) [[deprecated]];
[[deprecated]] static void WriteAsOBJ(Geometry* geometry, const std::string& filePath);
[[deprecated]] static void WriteAsUSD(Geometry* geometry, const std::string& filePath);
[[deprecated]] static void WriteObjAsZip(Geometry* geometry, const std::string& texturePath, const std::string& zipPath);
[[deprecated]] static void WriteAsUSDZ(Geometry* geometry, const std::string& texturePath, const std::string& usdzPath);
[[deprecated]] static void WriteAsFBX(Geometry* geometry, const std::string& texturePath, const std::string& fbxPath);
[[deprecated]] static void WriteAsSTL(Geometry* geometry, const std::string& filePath, bool binary);
};
}

View File

@@ -13,9 +13,9 @@ namespace OpenVulkano::Scene
class Geometry;
class MeshLoader
{
static void ParseAssimpFile(Geometry *geometry, const std::string& file) [[deprecated]];
static void ParseUSDFile(Geometry *geometry, const std::string& file) [[deprecated]];
[[deprecated]] static void ParseAssimpFile(Geometry *geometry, const std::string& file);
[[deprecated]] static void ParseUSDFile(Geometry *geometry, const std::string& file);
public:
static Geometry* LoadFromFile(const std::string& file) [[deprecated]];
[[deprecated]] static Geometry* LoadFromFile(const std::string& file);
};
}

View File

@@ -42,8 +42,8 @@ namespace OpenVulkano::Scene
, m_subpixelLayout(subpixelLayout.value_or(SubpixelLayout::UNKNOWN))
{
}
void GenerateAtlas(const std::string& fontFile, const std::set<uint32_t>& charset,
const std::optional<std::string>& pngOutput = std::nullopt) [[deprecated]] override;
[[deprecated]] void GenerateAtlas(const std::string& fontFile, const std::set<uint32_t>& charset,
const std::optional<std::string>& pngOutput = std::nullopt) override;
void GenerateAtlas(const Array<char>& fontData, const std::set<uint32_t>& charset,
const std::optional<std::string>& pngOutput = std::nullopt) override;
private:

View File

@@ -45,6 +45,6 @@ namespace OpenVulkano::Scene
const std::set<uint32_t>& charset = {}) const;
private:
Array<char> FindFont(const std::string& fontFile) const [[deprecated]];
[[deprecated]] Array<char> FindFont(const std::string& fontFile) const;
};
}

View File

@@ -20,8 +20,8 @@ namespace OpenVulkano::Scene
{
public:
virtual ~IFontAtlasGenerator() = default;
virtual void GenerateAtlas(const std::string& fontFile, const std::set<uint32_t>& charset,
const std::optional<std::string>& pngOutput = std::nullopt) [[deprecated]] = 0;
[[deprecated]] virtual void GenerateAtlas(const std::string& fontFile, const std::set<uint32_t>& charset,
const std::optional<std::string>& pngOutput = std::nullopt) = 0;
virtual void GenerateAtlas(const Array<char>& fontData, const std::set<uint32_t>& charset,
const std::optional<std::string>& pngOutput = std::nullopt) = 0;
virtual const std::shared_ptr<FontAtlas>& GetAtlas() const = 0;

View File

@@ -42,12 +42,13 @@ namespace OpenVulkano::Scene
using Config = SdfFontAtlasGeneratorConfig;
static constexpr int channelsCount = (Channels == 1 ? 1 : 4);
SdfFontAtlasGeneratorGeneric();
void GenerateAtlas(const std::string& fontFile, const std::set<uint32_t>& charset,
const std::optional<std::string>& pngOutput = std::nullopt) [[deprecated]] override;
[[deprecated]] void GenerateAtlas(const std::string& fontFile, const std::set<uint32_t>& charset,
const std::optional<std::string>& pngOutput = std::nullopt) override;
void GenerateAtlas(const Array<char>& fontData, const std::set<uint32_t>& charset,
const std::optional<std::string>& pngOutput = std::nullopt) override;
void GenerateAtlas(const std::string& fontFile, const msdf_atlas::Charset& charset = msdf_atlas::Charset::ASCII,
const std::optional<std::string>& pngOutput = std::nullopt) [[deprecated]];
[[deprecated]] void GenerateAtlas(const std::string& fontFile,
const msdf_atlas::Charset& charset = msdf_atlas::Charset::ASCII,
const std::optional<std::string>& pngOutput = std::nullopt);
void GenerateAtlas(const msdfgen::byte* fontData, int length,
const msdf_atlas::Charset& charset = msdf_atlas::Charset::ASCII,
const std::optional<std::string>& pngOutput = std::nullopt);

View File

@@ -14,8 +14,9 @@ namespace OpenVulkano
* @param entryPoint - the name of the void function in the shader
* @param shaderStage - type of the shader that needs to be compiled
*/
static Array<uint32_t> CompileGLSLToSpirv(const std::string& absPath, bool hasIncludes,
const std::string& incPath = std::string(), const std::string& entryPoint = "main") [[deprecated]]
[[deprecated]] static Array<uint32_t> CompileGLSLToSpirv(const std::string& absPath, bool hasIncludes,
const std::string& incPath = std::string(),
const std::string& entryPoint = "main")
#if defined(HAS_SHADERC)
;
#else