2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-07-07 07:25:52 +00:00

Database: Use [[maybe_unused]] instead of (void)

Same behavior, but without the need to duplicate the variable name.
This commit is contained in:
Lioncash 2019-08-19 23:06:54 -04:00
parent 1fb18dbf26
commit 93ec114e0c

View File

@ -62,7 +62,7 @@ class IDataSpec {
public: public:
IDataSpec(const DataSpecEntry* specEntry) : m_specEntry(specEntry) {} IDataSpec(const DataSpecEntry* specEntry) : m_specEntry(specEntry) {}
virtual ~IDataSpec() {} virtual ~IDataSpec() = default;
using FCookProgress = std::function<void(const SystemChar*)>; using FCookProgress = std::function<void(const SystemChar*)>;
/** /**
@ -91,43 +91,33 @@ public:
virtual void setThreadProject() {} virtual void setThreadProject() {}
virtual bool canExtract(const ExtractPassInfo& info, std::vector<ExtractReport>& reps) { virtual bool canExtract([[maybe_unused]] const ExtractPassInfo& info,
(void)info; [[maybe_unused]] std::vector<ExtractReport>& reps) {
(void)reps;
LogModule.report(logvisor::Error, fmt("not implemented")); LogModule.report(logvisor::Error, fmt("not implemented"));
return false; return false;
} }
virtual void doExtract(const ExtractPassInfo& info, const MultiProgressPrinter& progress) { virtual void doExtract([[maybe_unused]] const ExtractPassInfo& info,
(void)info; [[maybe_unused]] const MultiProgressPrinter& progress) {}
(void)progress;
}
virtual bool canCook(const ProjectPath& path, blender::Token& btok) { virtual bool canCook([[maybe_unused]] const ProjectPath& path, [[maybe_unused]] blender::Token& btok) {
(void)path;
LogModule.report(logvisor::Error, fmt("not implemented")); LogModule.report(logvisor::Error, fmt("not implemented"));
return false; return false;
} }
virtual const DataSpecEntry* overrideDataSpec(const ProjectPath& path, virtual const DataSpecEntry* overrideDataSpec([[maybe_unused]] const ProjectPath& path,
const Database::DataSpecEntry* oldEntry) const { const DataSpecEntry* oldEntry) const {
(void)path;
return oldEntry; return oldEntry;
} }
virtual void doCook(const ProjectPath& path, const ProjectPath& cookedPath, bool fast, blender::Token& btok, virtual void doCook([[maybe_unused]] const ProjectPath& path, [[maybe_unused]] const ProjectPath& cookedPath,
FCookProgress progress) { [[maybe_unused]] bool fast, [[maybe_unused]] blender::Token& btok,
(void)path; [[maybe_unused]] FCookProgress progress) {}
(void)cookedPath;
(void)fast;
(void)progress;
}
virtual bool canPackage(const ProjectPath& path) { virtual bool canPackage([[maybe_unused]] const ProjectPath& path) {
(void)path;
return false; return false;
} }
virtual void doPackage(const ProjectPath& path, const Database::DataSpecEntry* entry, bool fast, blender::Token& btok, virtual void doPackage([[maybe_unused]] const ProjectPath& path, [[maybe_unused]] const DataSpecEntry* entry,
const MultiProgressPrinter& progress, ClientProcess* cp = nullptr) { [[maybe_unused]] bool fast, [[maybe_unused]] blender::Token& btok,
(void)path; [[maybe_unused]] const MultiProgressPrinter& progress,
} [[maybe_unused]] ClientProcess* cp = nullptr) {}
virtual void interruptCook() {} virtual void interruptCook() {}
@ -203,10 +193,8 @@ protected:
* Part of the cooking process may include embedding database-refs to dependencies. * Part of the cooking process may include embedding database-refs to dependencies.
* This method should store the 64-bit value provided by IDataObject::id() when doing this. * This method should store the 64-bit value provided by IDataObject::id() when doing this.
*/ */
virtual bool cookObject(FDataAppender dataAppender, DataEndianness endianness, DataPlatform platform) { virtual bool cookObject([[maybe_unused]] FDataAppender dataAppender, [[maybe_unused]] DataEndianness endianness,
(void)dataAppender; [[maybe_unused]] DataPlatform platform) {
(void)endianness;
(void)platform;
return true; return true;
} }
@ -220,7 +208,7 @@ protected:
* Dependencies registered via this method will eventually have this method called on themselves * Dependencies registered via this method will eventually have this method called on themselves
* as well. This is a non-recursive operation, no need for subclasses to implement recursion-control. * as well. This is a non-recursive operation, no need for subclasses to implement recursion-control.
*/ */
virtual void gatherDeps(FDepAdder depAdder) { (void)depAdder; } virtual void gatherDeps([[maybe_unused]] FDepAdder depAdder) {}
/** /**
* @brief Get a packagable FourCC representation of the object's type * @brief Get a packagable FourCC representation of the object's type