summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Maennich <matthias@maennich.net>2017-09-19 16:00:21 +0200
committerBrad King <brad.king@kitware.com>2017-09-28 07:23:41 -0400
commita45928cdebcf37de2605e4f58509a37542dd9eba (patch)
tree57e18d073c2fdcc2fd9c7d3d04b982c4fb5b2f48
parentb128f8c5bc02f716c700d4560b949b05afdcb659 (diff)
downloadcmake-a45928cdebcf37de2605e4f58509a37542dd9eba.tar.gz
Fix some occurrences of missing override keywords
Fix issues diagnosed by clang-tidy [modernize-use-override]. These occurrences are only showing up on OSX. Signed-off-by: Matthias Maennich <matthias@maennich.net>
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx9
-rw-r--r--Source/cmLocalXCodeGenerator.h16
-rw-r--r--Source/cmMachO.cxx2
-rw-r--r--Source/cmXCode21Object.h2
4 files changed, 16 insertions, 13 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index a1bec6bed0..29b06c354c 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -47,8 +47,11 @@ public:
: Version("1.5")
{
}
- void StartElement(const std::string&, const char**) { this->Data = ""; }
- void EndElement(const std::string& name)
+ void StartElement(const std::string&, const char**) override
+ {
+ this->Data = "";
+ }
+ void EndElement(const std::string& name) override
{
if (name == "key") {
this->Key = this->Data;
@@ -58,7 +61,7 @@ public:
}
}
}
- void CharacterDataHandler(const char* data, int length)
+ void CharacterDataHandler(const char* data, int length) override
{
this->Data.append(data, length);
}
diff --git a/Source/cmLocalXCodeGenerator.h b/Source/cmLocalXCodeGenerator.h
index b05eab77ed..8c9596f857 100644
--- a/Source/cmLocalXCodeGenerator.h
+++ b/Source/cmLocalXCodeGenerator.h
@@ -27,16 +27,16 @@ public:
///! Set cache only and recurse to false by default.
cmLocalXCodeGenerator(cmGlobalGenerator* gg, cmMakefile* mf);
- virtual ~cmLocalXCodeGenerator();
- virtual std::string GetTargetDirectory(
- cmGeneratorTarget const* target) const;
- virtual void AppendFlagEscape(std::string& flags,
- const std::string& rawFlag);
- virtual void Generate();
+ ~cmLocalXCodeGenerator() override;
+ std::string GetTargetDirectory(
+ cmGeneratorTarget const* target) const override;
+ void AppendFlagEscape(std::string& flags,
+ const std::string& rawFlag) override;
+ void Generate() override;
virtual void GenerateInstallRules();
- virtual void ComputeObjectFilenames(
+ void ComputeObjectFilenames(
std::map<cmSourceFile const*, std::string>& mapping,
- cmGeneratorTarget const* gt = nullptr);
+ cmGeneratorTarget const* gt = nullptr) override;
private:
};
diff --git a/Source/cmMachO.cxx b/Source/cmMachO.cxx
index 3706dd330d..8002175bc0 100644
--- a/Source/cmMachO.cxx
+++ b/Source/cmMachO.cxx
@@ -134,7 +134,7 @@ public:
: cmMachOHeaderAndLoadCommands(_swap)
{
}
- bool read_mach_o(cmsys::ifstream& fin)
+ bool read_mach_o(cmsys::ifstream& fin) override
{
if (!read(fin, this->Header)) {
return false;
diff --git a/Source/cmXCode21Object.h b/Source/cmXCode21Object.h
index bcd8d93e18..8e4b80fc19 100644
--- a/Source/cmXCode21Object.h
+++ b/Source/cmXCode21Object.h
@@ -14,7 +14,7 @@ class cmXCode21Object : public cmXCodeObject
{
public:
cmXCode21Object(PBXType ptype, Type type);
- virtual void PrintComment(std::ostream&);
+ void PrintComment(std::ostream&) override;
static void PrintList(std::vector<cmXCodeObject*> const&, std::ostream& out,
PBXType t);
static void PrintList(std::vector<cmXCodeObject*> const&, std::ostream& out);