Skip to content

Commit

Permalink
fix(vpkpp): remove nodiscard from static creation functions
Browse files Browse the repository at this point in the history
  • Loading branch information
craftablescience committed Jul 18, 2024
1 parent c594b80 commit 4eccd88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/vpkpp/format/VPK.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ class VPK : public PackFile {
using EntryCreationCallback = std::function<std::tuple<bool, uint32_t>(const std::string& fullEntryPath)>;

/// Create a new directory VPK file - must end in "_dir.vpk"! This is not enforced but STRONGLY recommended
[[nodiscard]] static std::unique_ptr<PackFile> createEmpty(const std::string& path, PackFileOptions options = {});
static std::unique_ptr<PackFile> createEmpty(const std::string& path, PackFileOptions options = {});

/// Create a new directory VPK file from a directory, the contents of the directory will be present in the root VPK directory. (See above comment)
[[nodiscard]] static std::unique_ptr<PackFile> createFromDirectory(const std::string& vpkPath, const std::string& contentPath, bool saveToDir = false, PackFileOptions options = {}, const Callback& bakeCallback = nullptr);
static std::unique_ptr<PackFile> createFromDirectory(const std::string& vpkPath, const std::string& contentPath, bool saveToDir = false, PackFileOptions options = {}, const Callback& bakeCallback = nullptr);

/// Create a new directory VPK file from a directory, the contents of the directory will be present in the root VPK directory. Each entry's properties is determined by a callback. (See above comment)
[[nodiscard]] static std::unique_ptr<PackFile> createFromDirectoryProcedural(const std::string& vpkPath, const std::string& contentPath, const EntryCreationCallback& creationCallback, PackFileOptions options = {}, const Callback& bakeCallback = nullptr);
static std::unique_ptr<PackFile> createFromDirectoryProcedural(const std::string& vpkPath, const std::string& contentPath, const EntryCreationCallback& creationCallback, PackFileOptions options = {}, const Callback& bakeCallback = nullptr);

/// Open a directory VPK file
[[nodiscard]] static std::unique_ptr<PackFile> open(const std::string& path, PackFileOptions options = {}, const Callback& callback = nullptr);
Expand Down

0 comments on commit 4eccd88

Please sign in to comment.