From bde362811368647047f3ca13bdec596f092ecffe Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 19 Dec 2022 15:39:27 +0200 Subject: [PATCH] Mark overridden virtual functions as such --- source/androidapplicationcomponent.h | 2 +- source/androidassetpackagingtool.h | 4 ++-- source/androidcompiler.h | 2 +- source/androidlinker.h | 2 +- source/androidmanifestfile.h | 2 +- source/androidmanifestgenerator.h | 6 +++--- source/androidpackagefile.h | 2 +- source/androidresourcebundle.h | 2 +- source/androidresourcefile.h | 2 +- source/androidtools.h | 4 ++-- source/apkbuilder.h | 6 +++--- source/binary.h | 4 ++-- source/binarycomponent.h | 6 +++--- source/binarypackage.h | 2 +- source/buildercli.h | 2 +- source/chainedtask.h | 8 ++++---- source/compilecommandsgenerator.h | 6 +++--- source/compilecommandsjson.h | 4 ++-- source/copy.h | 6 +++--- source/csourcefile.h | 6 +++--- source/datacollection.h | 4 ++-- source/datapack.h | 2 +- source/datapackcomponent.h | 2 +- source/datasourcefile.h | 2 +- source/datatool.h | 8 ++++---- source/datatransform.h | 4 ++-- source/executable.h | 2 +- source/exportdefinitions.h | 2 +- source/externaltask.h | 10 +++++----- source/file.h | 2 +- source/filetarget.h | 8 ++++---- source/gnuarchiver.h | 6 +++--- source/gnucompiler.h | 12 ++++++------ source/gnulinker.h | 14 +++++++------- source/importlibrary.h | 2 +- source/installcomponent.h | 2 +- source/installedfile.h | 8 ++++---- source/internaltask.h | 8 ++++---- source/jarsigner.h | 4 ++-- source/mingwdlltool.h | 6 +++--- source/msvcarchiver.h | 6 +++--- source/msvccompiler.h | 12 ++++++------ source/msvclinker.h | 8 ++++---- source/objcsourcefile.h | 4 ++-- source/objectfile.h | 6 +++--- source/pkgconfigfile.h | 2 +- source/pkgconfiggenerator.h | 6 +++--- source/sharedlibrary.h | 2 +- source/sourcearchivecomponent.h | 2 +- source/sourcegenerator.h | 6 +++--- source/sourcepackage.h | 6 +++--- source/staticlibrary.h | 4 ++-- source/tar.h | 6 +++--- source/tarball.h | 2 +- source/templatefile.h | 2 +- source/tool.h | 10 +++++----- source/vcxprojectfile.h | 2 +- source/vcxprojectgenerator.h | 6 +++--- source/virtualtarget.h | 6 +++--- source/vssolutionfile.h | 4 ++-- source/vssolutiongenerator.h | 6 +++--- 61 files changed, 147 insertions(+), 147 deletions(-) diff --git a/source/androidapplicationcomponent.h b/source/androidapplicationcomponent.h index af465e5..017467f 100644 --- a/source/androidapplicationcomponent.h +++ b/source/androidapplicationcomponent.h @@ -23,7 +23,7 @@ private: public: AndroidApplicationComponent(SourcePackage &, const std::string &); - virtual void create_targets() const; + void create_targets() const override; }; #endif diff --git a/source/androidassetpackagingtool.h b/source/androidassetpackagingtool.h index 1366087..639da92 100644 --- a/source/androidassetpackagingtool.h +++ b/source/androidassetpackagingtool.h @@ -13,8 +13,8 @@ private: public: AndroidAssetPackagingTool(Builder &, const AndroidSdk &); - virtual Target *create_target(const std::list &, const std::string &); - virtual Task *run(const Target &) const; + Target *create_target(const std::list &, const std::string &) override; + Task *run(const Target &) const override; }; #endif diff --git a/source/androidcompiler.h b/source/androidcompiler.h index dbd2da6..d03c4fd 100644 --- a/source/androidcompiler.h +++ b/source/androidcompiler.h @@ -14,7 +14,7 @@ public: AndroidCompiler(Builder &, const Architecture &, const std::string &, const AndroidNdk &); protected: - virtual void do_prepare(); + void do_prepare() override; }; #endif diff --git a/source/androidlinker.h b/source/androidlinker.h index 2c9ea72..9d880d2 100644 --- a/source/androidlinker.h +++ b/source/androidlinker.h @@ -10,7 +10,7 @@ class AndroidLinker: public GnuLinker public: AndroidLinker(Builder &, const Architecture &, const AndroidNdk &); - virtual Target *create_target(const std::list &, const std::string &); + Target *create_target(const std::list &, const std::string &) override; }; #endif diff --git a/source/androidmanifestfile.h b/source/androidmanifestfile.h index 8bd5fe3..8f1af50 100644 --- a/source/androidmanifestfile.h +++ b/source/androidmanifestfile.h @@ -20,7 +20,7 @@ private: public: AndroidManifestFile(Builder &, const AndroidApplicationComponent &); - virtual const char *get_type() const { return "AndroidManifestFile"; } + const char *get_type() const override { return "AndroidManifestFile"; } void set_native_library(SharedLibrary *); SharedLibrary *get_native_library() const { return native_lib; } diff --git a/source/androidmanifestgenerator.h b/source/androidmanifestgenerator.h index f0d4269..c2c2a95 100644 --- a/source/androidmanifestgenerator.h +++ b/source/androidmanifestgenerator.h @@ -18,14 +18,14 @@ private: Worker(const AndroidManifestFile &); private: - virtual void main(); + void main() override; }; public: AndroidManifestGenerator(Builder &); - virtual Target *create_target(const std::list &, const std::string &); - virtual Task *run(const Target &) const; + Target *create_target(const std::list &, const std::string &) override; + Task *run(const Target &) const override; }; #endif diff --git a/source/androidpackagefile.h b/source/androidpackagefile.h index 4f1c692..644b5d4 100644 --- a/source/androidpackagefile.h +++ b/source/androidpackagefile.h @@ -10,7 +10,7 @@ class AndroidPackageFile: public FileTarget public: AndroidPackageFile(Builder &, const Component &, AndroidResourceBundle &, const std::list &); - virtual const char *get_type() const { return "AndroidPackageFile"; } + const char *get_type() const override { return "AndroidPackageFile"; } }; #endif diff --git a/source/androidresourcebundle.h b/source/androidresourcebundle.h index 253b44b..92fc2b8 100644 --- a/source/androidresourcebundle.h +++ b/source/androidresourcebundle.h @@ -10,7 +10,7 @@ class AndroidResourceBundle: public FileTarget public: AndroidResourceBundle(Builder &, const Component &, AndroidManifestFile &, const std::list &); - virtual const char *get_type() const { return "AndroidResourceBundle"; } + const char *get_type() const override { return "AndroidResourceBundle"; } }; #endif diff --git a/source/androidresourcefile.h b/source/androidresourcefile.h index 5f3cd3a..162026c 100644 --- a/source/androidresourcefile.h +++ b/source/androidresourcefile.h @@ -14,7 +14,7 @@ private: public: AndroidResourceFile(Builder &, const Component &, const Msp::FS::Path &); - virtual const char *get_type() const { return "AndroidResourceFile"; } + const char *get_type() const override { return "AndroidResourceFile"; } }; #endif diff --git a/source/androidtools.h b/source/androidtools.h index dfa8a11..bef95f8 100644 --- a/source/androidtools.h +++ b/source/androidtools.h @@ -38,7 +38,7 @@ public: private: void find_build_tools_dir(); - virtual void init_api_level(unsigned); + void init_api_level(unsigned) override; public: const Msp::FS::Path &get_build_tools_dir() const { return build_tools_dir; } @@ -59,7 +59,7 @@ private: static Msp::FS::Path create_default_path(const AndroidSdk &); void find_toolchain_dir(); - virtual void init_api_level(unsigned); + void init_api_level(unsigned) override; public: const Msp::FS::Path &get_bin_dir() const { return bin_dir; } diff --git a/source/apkbuilder.h b/source/apkbuilder.h index 7b73aa7..673063e 100644 --- a/source/apkbuilder.h +++ b/source/apkbuilder.h @@ -11,11 +11,11 @@ private: public: ApkBuilder(Builder &); - virtual Target *create_target(const std::list &, const std::string &); + Target *create_target(const std::list &, const std::string &) override; protected: - virtual void do_prepare(); + void do_prepare() override; public: - virtual Task *run(const Target &) const; + Task *run(const Target &) const override; }; #endif diff --git a/source/binary.h b/source/binary.h index d763dd5..a8d10f0 100644 --- a/source/binary.h +++ b/source/binary.h @@ -23,10 +23,10 @@ protected: Binary(Builder &, const Component &, const std::string &, const std::list &); public: - virtual void collect_build_info(BuildInfo &) const; + void collect_build_info(BuildInfo &) const override; protected: - virtual void find_dependencies(); + void find_dependencies() override; }; #endif diff --git a/source/binarycomponent.h b/source/binarycomponent.h index 3a6affd..7c84534 100644 --- a/source/binarycomponent.h +++ b/source/binarycomponent.h @@ -32,9 +32,9 @@ public: Type get_type() const { return type; } - virtual void create_build_info(); - virtual void update_exported_build_info(BuildInfo &) const; - virtual void create_targets() const; + void create_build_info() override; + void update_exported_build_info(BuildInfo &) const override; + void create_targets() const override; }; #endif diff --git a/source/binarypackage.h b/source/binarypackage.h index b8c29de..f015ee5 100644 --- a/source/binarypackage.h +++ b/source/binarypackage.h @@ -36,7 +36,7 @@ public: static BinaryPackage *from_flags(Builder &, const std::string &, const Flags &, const Flags & = Flags()); private: static void process_flags(const Flags &, BuildInfo &); - virtual void do_prepare(); + void do_prepare() override; }; #endif diff --git a/source/buildercli.h b/source/buildercli.h index efc2cc9..77e58ca 100644 --- a/source/buildercli.h +++ b/source/buildercli.h @@ -39,7 +39,7 @@ public: BuilderCLI(int, char **); ~BuilderCLI(); - virtual int main(); + int main() override; private: bool prepare_build(); diff --git a/source/chainedtask.h b/source/chainedtask.h index 2014f02..4cb677c 100644 --- a/source/chainedtask.h +++ b/source/chainedtask.h @@ -21,10 +21,10 @@ public: void add_task(Task *); - virtual std::string get_command() const; - virtual void start(); - virtual Status check(); - virtual Status wait(); + std::string get_command() const override; + void start() override; + Status check() override; + Status wait() override; private: bool process(Status); }; diff --git a/source/compilecommandsgenerator.h b/source/compilecommandsgenerator.h index ba74f11..29bb043 100644 --- a/source/compilecommandsgenerator.h +++ b/source/compilecommandsgenerator.h @@ -18,14 +18,14 @@ private: Worker(const CompileCommandsJson &); private: - virtual void main(); + void main() override; }; public: CompileCommandsGenerator(Builder &); - virtual Target *create_target(const std::list &, const std::string &); - virtual Task *run(const Target &) const; + Target *create_target(const std::list &, const std::string &) override; + Task *run(const Target &) const override; }; #endif diff --git a/source/compilecommandsjson.h b/source/compilecommandsjson.h index 1d170c5..8798849 100644 --- a/source/compilecommandsjson.h +++ b/source/compilecommandsjson.h @@ -11,10 +11,10 @@ private: public: CompileCommandsJson(Builder &, const SourcePackage &); - virtual const char *get_type() const { return "CompileCommandsJson"; } + const char *get_type() const override { return "CompileCommandsJson"; } protected: - virtual void find_dependencies(); + void find_dependencies() override; }; #endif diff --git a/source/copy.h b/source/copy.h index dedd0f5..6353ab1 100644 --- a/source/copy.h +++ b/source/copy.h @@ -25,14 +25,14 @@ private: public: Worker(const InstalledFile &); private: - virtual void main(); + void main() override; }; public: Copy(Builder &); - virtual Target *create_target(const std::list &, const std::string &); - virtual Task *run(const Target &) const; + Target *create_target(const std::list &, const std::string &) override; + Task *run(const Target &) const override; }; #endif diff --git a/source/csourcefile.h b/source/csourcefile.h index dce6e19..55809b0 100644 --- a/source/csourcefile.h +++ b/source/csourcefile.h @@ -19,12 +19,12 @@ public: CSourceFile(Builder &, const Msp::FS::Path &); CSourceFile(Builder &, const Component &, const Msp::FS::Path &); - virtual const char *get_type() const { return "CSourceFile"; } + const char *get_type() const override { return "CSourceFile"; } const IncludeList &get_includes() const { return includes; } protected: virtual void parse_includes(Msp::IO::Base &); - virtual void find_dependencies(); - virtual void modified(); + void find_dependencies() override; + void modified() override; }; #endif diff --git a/source/datacollection.h b/source/datacollection.h index b86da07..aeb270f 100644 --- a/source/datacollection.h +++ b/source/datacollection.h @@ -16,11 +16,11 @@ private: static Msp::FS::Path generate_target_path(const Component &, const Msp::FS::Path &); public: - virtual const char *get_type() const { return "DataCollection"; } + const char *get_type() const override { return "DataCollection"; } DataTransform &get_source() const { return source; } private: - virtual void find_dependencies(); + void find_dependencies() override; }; #endif diff --git a/source/datapack.h b/source/datapack.h index d2f667a..81b2e9e 100644 --- a/source/datapack.h +++ b/source/datapack.h @@ -16,7 +16,7 @@ private: static Msp::FS::Path generate_target_path(const Component &); public: - virtual const char *get_type() const { return "DataPack"; } + const char *get_type() const override { return "DataPack"; } const FileList &get_files() const { return files; } }; diff --git a/source/datapackcomponent.h b/source/datapackcomponent.h index 75b99a6..75eda73 100644 --- a/source/datapackcomponent.h +++ b/source/datapackcomponent.h @@ -8,7 +8,7 @@ class DataPackComponent: public Component public: DataPackComponent(SourcePackage &, const std::string &); - virtual void create_targets() const; + void create_targets() const override; }; #endif diff --git a/source/datasourcefile.h b/source/datasourcefile.h index 23c2543..64093b5 100644 --- a/source/datasourcefile.h +++ b/source/datasourcefile.h @@ -9,7 +9,7 @@ public: DataSourceFile(Builder &, const Msp::FS::Path &); DataSourceFile(Builder &, const Component &, const Msp::FS::Path &); - virtual const char *get_type() const { return "DataSourceFile"; } + const char *get_type() const override { return "DataSourceFile"; } }; #endif diff --git a/source/datatool.h b/source/datatool.h index e898612..7996ab5 100644 --- a/source/datatool.h +++ b/source/datatool.h @@ -8,10 +8,10 @@ class DataTool: public Tool public: DataTool(Builder &); - virtual Target *create_source(const Component &, const Msp::FS::Path &) const; - virtual Target *create_target(const std::list &, const std::string &); - virtual std::string create_build_signature(const BuildInfo &) const; - virtual Task *run(const Target &) const; + Target *create_source(const Component &, const Msp::FS::Path &) const override; + Target *create_target(const std::list &, const std::string &) override; + std::string create_build_signature(const BuildInfo &) const override; + Task *run(const Target &) const override; }; #endif diff --git a/source/datatransform.h b/source/datatransform.h index b39eacd..f024973 100644 --- a/source/datatransform.h +++ b/source/datatransform.h @@ -11,10 +11,10 @@ private: public: DataTransform(Builder &, const Component &, const Msp::FS::Path &); - virtual const char *get_type() const { return "DataTransform"; } + const char *get_type() const override { return "DataTransform"; } private: - virtual void find_dependencies(); + void find_dependencies() override; }; #endif diff --git a/source/executable.h b/source/executable.h index a8950f1..e9c99ab 100644 --- a/source/executable.h +++ b/source/executable.h @@ -9,7 +9,7 @@ public: Executable(Builder &, const Msp::FS::Path &); Executable(Builder &, const Component &, const std::list &); - virtual const char *get_type() const { return "Executable"; } + const char *get_type() const override { return "Executable"; } }; #endif diff --git a/source/exportdefinitions.h b/source/exportdefinitions.h index 22ba94b..3e7a994 100644 --- a/source/exportdefinitions.h +++ b/source/exportdefinitions.h @@ -16,7 +16,7 @@ private: static Msp::FS::Path generate_target_path(const Component &); public: - virtual const char *get_type() const { return "ExportDefinitions"; } + const char *get_type() const override { return "ExportDefinitions"; } }; #endif diff --git a/source/externaltask.h b/source/externaltask.h index 26a6aca..8079613 100644 --- a/source/externaltask.h +++ b/source/externaltask.h @@ -45,12 +45,12 @@ public: name. If the working directory is not specified, no chdir is done. */ ExternalTask(const Arguments &, const Msp::FS::Path & = Msp::FS::Path()); - virtual ~ExternalTask(); + ~ExternalTask(); - virtual std::string get_command() const; - virtual void start(); - virtual Status check(); - virtual Status wait(); + std::string get_command() const override; + void start() override; + Status check() override; + Status wait() override; private: Status do_wait(bool); diff --git a/source/file.h b/source/file.h index 5a216a9..42d73b8 100644 --- a/source/file.h +++ b/source/file.h @@ -12,7 +12,7 @@ public: File(Builder &b, const Msp::FS::Path &t): FileTarget(b, t) { } File(Builder &b, const SourcePackage &p, const Msp::FS::Path &t): FileTarget(b, p, t) { } - virtual const char *get_type() const { return "File"; } + const char *get_type() const override { return "File"; } }; #endif diff --git a/source/filetarget.h b/source/filetarget.h index 976590f..5c11b5c 100644 --- a/source/filetarget.h +++ b/source/filetarget.h @@ -39,16 +39,16 @@ public: void touch(); protected: - virtual void check_rebuild(); + void check_rebuild() override; virtual std::string create_build_signature() const; - virtual void build(Task &); + void build(Task &) override; - virtual void build_finished(bool); + void build_finished(bool) override; public: - virtual void clean(); + void clean() override; }; #endif diff --git a/source/gnuarchiver.h b/source/gnuarchiver.h index f7d90ab..ce3906d 100644 --- a/source/gnuarchiver.h +++ b/source/gnuarchiver.h @@ -8,9 +8,9 @@ class GnuArchiver: public Tool public: GnuArchiver(Builder &, const Architecture &); - virtual Target *create_target(const std::list &, const std::string &); - virtual std::string create_build_signature(const BuildInfo &) const; - virtual Task *run(const Target &) const; + Target *create_target(const std::list &, const std::string &) override; + std::string create_build_signature(const BuildInfo &) const override; + Task *run(const Target &) const override; }; #endif diff --git a/source/gnucompiler.h b/source/gnucompiler.h index 9f5386d..9f81ac8 100644 --- a/source/gnucompiler.h +++ b/source/gnucompiler.h @@ -18,17 +18,17 @@ protected: public: GnuCompiler(Builder &, const Architecture &, const std::string &); - virtual Target *create_source(const Component &, const Msp::FS::Path &) const; - virtual Target *create_source(const Msp::FS::Path &) const; - virtual Target *create_target(const std::list &, const std::string &); - virtual std::string create_build_signature(const BuildInfo &) const; + Target *create_source(const Component &, const Msp::FS::Path &) const override; + Target *create_source(const Msp::FS::Path &) const override; + Target *create_target(const std::list &, const std::string &) override; + std::string create_build_signature(const BuildInfo &) const override; protected: - virtual void do_prepare(); + void do_prepare() override; void prepare_syspath(); void prepare_version(); void prepare_version(const std::string &); public: - virtual Task *run(const Target &) const; + Task *run(const Target &) const override; }; #endif diff --git a/source/gnulinker.h b/source/gnulinker.h index e8a4e3c..eb2b00f 100644 --- a/source/gnulinker.h +++ b/source/gnulinker.h @@ -21,11 +21,11 @@ private: public: Linker(GnuLinker &, const std::string &); - virtual std::string create_build_signature(const BuildInfo &) const; + std::string create_build_signature(const BuildInfo &) const override; private: - virtual void do_prepare(); + void do_prepare() override; public: - virtual Task *run(const Target &) const; + Task *run(const Target &) const override; }; Linker *default_linker; @@ -35,12 +35,12 @@ public: GnuLinker(Builder &, const Architecture &); ~GnuLinker(); - virtual Target *create_target(const std::list &, const std::string &); - virtual Target *create_install(Target &) const; + Target *create_target(const std::list &, const std::string &) override; + Target *create_install(Target &) const override; protected: - virtual void do_prepare(); + void do_prepare() override; public: - virtual Task *run(const Target &) const; + Task *run(const Target &) const override; }; #endif diff --git a/source/importlibrary.h b/source/importlibrary.h index 7f7167b..26c116d 100644 --- a/source/importlibrary.h +++ b/source/importlibrary.h @@ -22,7 +22,7 @@ private: static std::string generate_filename(const Component &, const SharedLibrary &); public: - virtual const char *get_type() const { return "ImportLibrary"; } + const char *get_type() const override { return "ImportLibrary"; } SharedLibrary *get_shared_library() const { return shared_lib; } }; diff --git a/source/installcomponent.h b/source/installcomponent.h index 43dae71..412bd0b 100644 --- a/source/installcomponent.h +++ b/source/installcomponent.h @@ -8,7 +8,7 @@ class InstallComponent: public Component public: InstallComponent(SourcePackage &, const std::string &); - virtual void create_targets() const; + void create_targets() const override; }; #endif diff --git a/source/installedfile.h b/source/installedfile.h index 9e886d5..0dd671f 100644 --- a/source/installedfile.h +++ b/source/installedfile.h @@ -19,7 +19,7 @@ private: static Msp::FS::Path generate_target_path(const Msp::FS::Path &, const FileTarget &i, const std::string &); public: - virtual const char *get_type() const { return "InstalledFile"; } + const char *get_type() const override { return "InstalledFile"; } FileTarget &get_source() const { return source; } /** Sets a symlink for the file. A relative path will be rooted at the @@ -28,12 +28,12 @@ public: const Msp::FS::Path &get_symlink() const { return link; } - virtual Target *get_real_target(); + Target *get_real_target() override; private: - virtual void check_rebuild(); + void check_rebuild() override; public: - virtual void clean(); + void clean() override; }; #endif diff --git a/source/internaltask.h b/source/internaltask.h index c927b0b..db3294b 100644 --- a/source/internaltask.h +++ b/source/internaltask.h @@ -32,10 +32,10 @@ public: InternalTask(Worker *); ~InternalTask(); - virtual std::string get_command() const { return ""; } - virtual void start(); - virtual Status check(); - virtual Status wait(); + std::string get_command() const override { return ""; } + void start() override; + Status check() override; + Status wait() override; }; #endif diff --git a/source/jarsigner.h b/source/jarsigner.h index cc773ea..9b695db 100644 --- a/source/jarsigner.h +++ b/source/jarsigner.h @@ -8,8 +8,8 @@ class JarSigner: public Tool public: JarSigner(Builder &); - virtual Target *create_target(const std::list &, const std::string &); - virtual Task *run(const Target &) const; + Target *create_target(const std::list &, const std::string &) override; + Task *run(const Target &) const override; }; #endif diff --git a/source/mingwdlltool.h b/source/mingwdlltool.h index 2930831..2d2a621 100644 --- a/source/mingwdlltool.h +++ b/source/mingwdlltool.h @@ -8,9 +8,9 @@ class MingwDllTool: public Tool public: MingwDllTool(Builder &, const Architecture &); - virtual Target *create_target(const std::list &, const std::string &); - virtual Target *create_install(Target &) const; - virtual Task *run(const Target &) const; + Target *create_target(const std::list &, const std::string &) override; + Target *create_install(Target &) const override; + Task *run(const Target &) const override; }; #endif diff --git a/source/msvcarchiver.h b/source/msvcarchiver.h index 0467ffb..a8fe34f 100644 --- a/source/msvcarchiver.h +++ b/source/msvcarchiver.h @@ -13,10 +13,10 @@ private: public: MsvcArchiver(Builder &, const Architecture &, const MicrosoftTools &); - virtual Target *create_target(const std::list &, const std::string &); - virtual std::string create_build_signature(const BuildInfo &) const; + Target *create_target(const std::list &, const std::string &) override; + std::string create_build_signature(const BuildInfo &) const override; - virtual Task *run(const Target &) const; + Task *run(const Target &) const override; }; #endif diff --git a/source/msvccompiler.h b/source/msvccompiler.h index 2a6f91f..bf2524a 100644 --- a/source/msvccompiler.h +++ b/source/msvccompiler.h @@ -13,16 +13,16 @@ private: public: MsvcCompiler(Builder &, const Architecture &, const std::string &, const MicrosoftTools &); - virtual Target *create_source(const Component &, const Msp::FS::Path &) const; - virtual Target *create_source(const Msp::FS::Path &) const; - virtual Target *create_target(const std::list &, const std::string &); - virtual std::string create_build_signature(const BuildInfo &) const; + Target *create_source(const Component &, const Msp::FS::Path &) const override; + Target *create_source(const Msp::FS::Path &) const override; + Target *create_target(const std::list &, const std::string &) override; + std::string create_build_signature(const BuildInfo &) const override; protected: - virtual void do_prepare(); + void do_prepare() override; public: - virtual Task *run(const Target &) const; + Task *run(const Target &) const override; }; #endif diff --git a/source/msvclinker.h b/source/msvclinker.h index 50f8a7b..f1e275d 100644 --- a/source/msvclinker.h +++ b/source/msvclinker.h @@ -13,14 +13,14 @@ private: public: MsvcLinker(Builder &, const Architecture &, const MicrosoftTools &); - virtual Target *create_target(const std::list &, const std::string &); - virtual std::string create_build_signature(const BuildInfo &) const; + Target *create_target(const std::list &, const std::string &) override; + std::string create_build_signature(const BuildInfo &) const override; protected: - virtual void do_prepare(); + void do_prepare() override; public: - virtual Task *run(const Target &) const; + Task *run(const Target &) const override; }; #endif diff --git a/source/objcsourcefile.h b/source/objcsourcefile.h index 2069615..fda3d29 100644 --- a/source/objcsourcefile.h +++ b/source/objcsourcefile.h @@ -12,10 +12,10 @@ public: ObjCSourceFile(Builder &, const Msp::FS::Path &); ObjCSourceFile(Builder &, const Component &, const Msp::FS::Path &); - virtual const char *get_type() const { return "ObjCSourceFile"; } + const char *get_type() const override { return "ObjCSourceFile"; } protected: - virtual void parse_includes(Msp::IO::Base &); + void parse_includes(Msp::IO::Base &) override; }; #endif diff --git a/source/objectfile.h b/source/objectfile.h index 48e4482..fc844d9 100644 --- a/source/objectfile.h +++ b/source/objectfile.h @@ -20,16 +20,16 @@ private: static Msp::FS::Path generate_target_path(const Component &, const Msp::FS::Path &); public: - virtual const char *get_type() const { return "ObjectFile"; } + const char *get_type() const override { return "ObjectFile"; } SourceFile &get_source() const { return source; } void set_used_in_shared_library(bool); bool is_used_in_shared_library() const { return used_in_shlib; } - virtual void collect_build_info(BuildInfo &) const; + void collect_build_info(BuildInfo &) const override; private: - virtual void find_dependencies(); + void find_dependencies() override; void find_dependencies(FileTarget *); }; diff --git a/source/pkgconfigfile.h b/source/pkgconfigfile.h index 5ec1aa4..81c8cd6 100644 --- a/source/pkgconfigfile.h +++ b/source/pkgconfigfile.h @@ -12,7 +12,7 @@ class PkgConfigFile: public FileTarget public: PkgConfigFile(Builder &, const SourcePackage &); - virtual const char *get_type() const { return "PkgConfigFile"; } + const char *get_type() const override { return "PkgConfigFile"; } }; #endif diff --git a/source/pkgconfiggenerator.h b/source/pkgconfiggenerator.h index a9adbc6..a13e588 100644 --- a/source/pkgconfiggenerator.h +++ b/source/pkgconfiggenerator.h @@ -18,7 +18,7 @@ private: Worker(const PkgConfigFile &); private: - virtual void main(); + void main() override; std::string prefixify(const Msp::FS::Path &, const Msp::FS::Path &); }; @@ -26,8 +26,8 @@ private: public: PkgConfigGenerator(Builder &); - virtual Target *create_target(const std::list &, const std::string &); - virtual Task *run(const Target &) const; + Target *create_target(const std::list &, const std::string &) override; + Task *run(const Target &) const override; }; #endif diff --git a/source/sharedlibrary.h b/source/sharedlibrary.h index c40bccd..b2cd59b 100644 --- a/source/sharedlibrary.h +++ b/source/sharedlibrary.h @@ -28,7 +28,7 @@ private: static std::string generate_filename(const Component &); public: - virtual const char *get_type() const { return "SharedLibrary"; } + const char *get_type() const override { return "SharedLibrary"; } const std::string &get_libname() const { return libname; } const std::string &get_soname() const { return soname; } diff --git a/source/sourcearchivecomponent.h b/source/sourcearchivecomponent.h index cfef56e..94c1bc5 100644 --- a/source/sourcearchivecomponent.h +++ b/source/sourcearchivecomponent.h @@ -8,7 +8,7 @@ class SourceArchiveComponent: public Component public: SourceArchiveComponent(SourcePackage &); - virtual void create_targets() const; + void create_targets() const override; }; #endif diff --git a/source/sourcegenerator.h b/source/sourcegenerator.h index b0c8d4b..964ea0a 100644 --- a/source/sourcegenerator.h +++ b/source/sourcegenerator.h @@ -32,10 +32,10 @@ private: public: SourceGenerator(Builder &, const SourcePackage &, const std::string &); - virtual Target *create_source(const Component &, const Msp::FS::Path &) const; - virtual Target *create_target(const std::list &, const std::string &); + Target *create_source(const Component &, const Msp::FS::Path &) const override; + Target *create_target(const std::list &, const std::string &) override; - virtual Task *run(const Target &) const; + Task *run(const Target &) const override; }; #endif diff --git a/source/sourcepackage.h b/source/sourcepackage.h index 5a1eddd..dfa2f4d 100644 --- a/source/sourcepackage.h +++ b/source/sourcepackage.h @@ -33,7 +33,7 @@ public: Loader(SourcePackage &, const Config::InputOptions &); private: void init(const Config::InputOptions *); - virtual void finish(); + void finish() override; void feature(const std::string &, const std::string &); template void component(const std::string &); @@ -87,12 +87,12 @@ public: void set_build_type(const BuildType &); const BuildInfo &get_build_info() const { return build_info; } private: - virtual void do_prepare(); + void do_prepare() override; public: Cache &get_cache() const { return cache; } private: - virtual void save_caches(); + void save_caches() override; }; #endif diff --git a/source/staticlibrary.h b/source/staticlibrary.h index 26d33e3..af8a57c 100644 --- a/source/staticlibrary.h +++ b/source/staticlibrary.h @@ -24,11 +24,11 @@ private: static std::string generate_filename(const Component &); public: - virtual const char *get_type() const { return "StaticLibrary"; } + const char *get_type() const override { return "StaticLibrary"; } void add_required_library(const std::string &); void add_library_path(const Msp::FS::Path &); - virtual void collect_build_info(BuildInfo &) const; + void collect_build_info(BuildInfo &) const override; }; #endif diff --git a/source/tar.h b/source/tar.h index 9be26d9..3719c41 100644 --- a/source/tar.h +++ b/source/tar.h @@ -19,15 +19,15 @@ private: Worker(const TarBall &); private: - virtual void main(); + void main() override; void store_number(char *, unsigned, unsigned); }; public: Tar(Builder &); - virtual Target *create_target(const std::list &, const std::string &); - virtual Task *run(const Target &) const; + Target *create_target(const std::list &, const std::string &) override; + Task *run(const Target &) const override; }; #endif diff --git a/source/tarball.h b/source/tarball.h index 18ff19d..105a2b1 100644 --- a/source/tarball.h +++ b/source/tarball.h @@ -8,7 +8,7 @@ class TarBall: public FileTarget public: TarBall(Builder &, const SourcePackage &, const std::string &); - virtual const char *get_type() const { return "TarBall"; } + const char *get_type() const override { return "TarBall"; } const SourcePackage *get_package() const; }; diff --git a/source/templatefile.h b/source/templatefile.h index d65c8ea..cb2841e 100644 --- a/source/templatefile.h +++ b/source/templatefile.h @@ -11,7 +11,7 @@ class TemplateFile: public SourceFile public: TemplateFile(Builder &, const Component &, const Msp::FS::Path &); - virtual const char *get_type() const { return "TemplateFile"; } + const char *get_type() const override { return "TemplateFile"; } }; #endif diff --git a/source/tool.h b/source/tool.h index 41b8c5f..ee1fa7a 100644 --- a/source/tool.h +++ b/source/tool.h @@ -136,11 +136,11 @@ protected: SubTool(Tool &); public: - virtual Target *create_source(const Component &, const Msp::FS::Path &) const; - virtual Target *create_source(const Msp::FS::Path &) const; - virtual Target *create_target(const std::list &, const std::string & = std::string()); - virtual Target *create_install(Target &) const; - virtual std::string create_build_signature(const BuildInfo &) const; + Target *create_source(const Component &, const Msp::FS::Path &) const override; + Target *create_source(const Msp::FS::Path &) const override; + Target *create_target(const std::list &, const std::string & = std::string()) override; + Target *create_install(Target &) const override; + std::string create_build_signature(const BuildInfo &) const override; }; diff --git a/source/vcxprojectfile.h b/source/vcxprojectfile.h index ff3aba1..268d4bb 100644 --- a/source/vcxprojectfile.h +++ b/source/vcxprojectfile.h @@ -11,7 +11,7 @@ private: public: VcxProjectFile(Builder &, const SourcePackage &); - virtual const char *get_type() const { return "VcxProjectFile"; } + const char *get_type() const override { return "VcxProjectFile"; } const std::string &get_guid() const { return guid; } }; diff --git a/source/vcxprojectgenerator.h b/source/vcxprojectgenerator.h index 919b8ec..05bb720 100644 --- a/source/vcxprojectgenerator.h +++ b/source/vcxprojectgenerator.h @@ -18,14 +18,14 @@ private: Worker(const VcxProjectFile &); private: - virtual void main(); + void main() override; }; public: VcxProjectGenerator(Builder &); - virtual Target *create_target(const std::list &, const std::string &); - virtual Task *run(const Target &) const; + Target *create_target(const std::list &, const std::string &) override; + Task *run(const Target &) const override; }; #endif diff --git a/source/virtualtarget.h b/source/virtualtarget.h index 8f3d95b..50d1274 100644 --- a/source/virtualtarget.h +++ b/source/virtualtarget.h @@ -11,12 +11,12 @@ class VirtualTarget: public Target public: VirtualTarget(Builder &, const std::string &); - virtual const char *get_type() const { return "VirtualTarget"; } + const char *get_type() const override { return "VirtualTarget"; } private: - virtual void check_rebuild(); + void check_rebuild() override; public: - virtual Task *build(); + Task *build() override; }; #endif diff --git a/source/vssolutionfile.h b/source/vssolutionfile.h index d35b4b9..0a97d32 100644 --- a/source/vssolutionfile.h +++ b/source/vssolutionfile.h @@ -8,9 +8,9 @@ class VsSolutionFile: public FileTarget public: VsSolutionFile(Builder &, const SourcePackage &); - virtual const char *get_type() const { return "VsSolutionFile"; } + const char *get_type() const override { return "VsSolutionFile"; } protected: - virtual void find_dependencies(); + void find_dependencies() override; }; #endif diff --git a/source/vssolutiongenerator.h b/source/vssolutiongenerator.h index 8eaca7c..2efddcd 100644 --- a/source/vssolutiongenerator.h +++ b/source/vssolutiongenerator.h @@ -18,14 +18,14 @@ private: Worker(const VsSolutionFile &); private: - virtual void main(); + void main() override; }; public: VsSolutionGenerator(Builder &); - virtual Target *create_target(const std::list &, const std::string &); - virtual Task *run(const Target &) const; + Target *create_target(const std::list &, const std::string &) override; + Task *run(const Target &) const override; }; #endif -- 2.45.2