You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jp...@apache.org on 2018/07/17 21:25:11 UTC

[7/7] mesos git commit: Apply the `override` keyword to stout.

Apply the `override` keyword to stout.

Review: https://reviews.apache.org/r/67866/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/5affcfd6
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/5affcfd6
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/5affcfd6

Branch: refs/heads/master
Commit: 5affcfd64317fade57ffa69ec632ef5cf34f2bb0
Parents: 8088142
Author: James Peach <jp...@apache.org>
Authored: Tue Jul 17 09:30:44 2018 -0700
Committer: James Peach <jp...@apache.org>
Committed: Tue Jul 17 14:23:01 2018 -0700

----------------------------------------------------------------------
 3rdparty/stout/include/stout/lambda.hpp      | 2 +-
 3rdparty/stout/include/stout/tests/utils.hpp | 4 ++--
 3rdparty/stout/tests/main.cpp                | 2 +-
 3rdparty/stout/tests/os/rmdir_tests.cpp      | 2 +-
 3rdparty/stout/tests/os/sendfile_tests.cpp   | 2 +-
 3rdparty/stout/tests/subcommand_tests.cpp    | 4 ++--
 6 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/5affcfd6/3rdparty/stout/include/stout/lambda.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/lambda.hpp b/3rdparty/stout/include/stout/lambda.hpp
index 252de89..2f796a3 100644
--- a/3rdparty/stout/include/stout/lambda.hpp
+++ b/3rdparty/stout/include/stout/lambda.hpp
@@ -458,7 +458,7 @@ private:
     CallableFn(const F& f) : f(f) {}
     CallableFn(F&& f) : f(std::move(f)) {}
 
-    virtual R operator()(Args&&... args) &&
+    R operator()(Args&&... args) && override
     {
       return internal::Invoke<R>{}(std::move(f), std::forward<Args>(args)...);
     }

http://git-wip-us.apache.org/repos/asf/mesos/blob/5affcfd6/3rdparty/stout/include/stout/tests/utils.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/tests/utils.hpp b/3rdparty/stout/include/stout/tests/utils.hpp
index e7336a5..eb13cce 100644
--- a/3rdparty/stout/include/stout/tests/utils.hpp
+++ b/3rdparty/stout/include/stout/tests/utils.hpp
@@ -33,7 +33,7 @@
 class TemporaryDirectoryTest : public ::testing::Test
 {
 protected:
-  virtual void SetUp()
+  void SetUp() override
   {
     // Save the current working directory.
     cwd = os::getcwd();
@@ -59,7 +59,7 @@ protected:
       << "Failed to chdir into '" << sandbox.get() << "'";
   }
 
-  virtual void TearDown()
+  void TearDown() override
   {
     // Return to previous working directory and cleanup the sandbox.
     ASSERT_SOME(os::chdir(cwd));

http://git-wip-us.apache.org/repos/asf/mesos/blob/5affcfd6/3rdparty/stout/tests/main.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/tests/main.cpp b/3rdparty/stout/tests/main.cpp
index 144399d..f08f62f 100644
--- a/3rdparty/stout/tests/main.cpp
+++ b/3rdparty/stout/tests/main.cpp
@@ -66,7 +66,7 @@ public:
     }
   }
 
-  bool disable(const ::testing::TestInfo* test) const
+  bool disable(const ::testing::TestInfo* test) const override
   {
     return matches(test, "SYMLINK_") && !can_create_symlinks;
   }

http://git-wip-us.apache.org/repos/asf/mesos/blob/5affcfd6/3rdparty/stout/tests/os/rmdir_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/tests/os/rmdir_tests.cpp b/3rdparty/stout/tests/os/rmdir_tests.cpp
index 518afc0..3ca4099 100644
--- a/3rdparty/stout/tests/os/rmdir_tests.cpp
+++ b/3rdparty/stout/tests/os/rmdir_tests.cpp
@@ -392,7 +392,7 @@ TEST_F(RmdirTest, RemoveDirectoryButPreserveRoot)
 class RmdirContinueOnErrorTest : public RmdirTest
 {
 public:
-  virtual void TearDown()
+  void TearDown() override
   {
     if (mountPoint.isSome()) {
       if (os::system("umount -f -l " + mountPoint.get()) != 0) {

http://git-wip-us.apache.org/repos/asf/mesos/blob/5affcfd6/3rdparty/stout/tests/os/sendfile_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/tests/os/sendfile_tests.cpp b/3rdparty/stout/tests/os/sendfile_tests.cpp
index cc1fa11..958aa66 100644
--- a/3rdparty/stout/tests/os/sendfile_tests.cpp
+++ b/3rdparty/stout/tests/os/sendfile_tests.cpp
@@ -45,7 +45,7 @@ public:
         "culpa qui officia deserunt mollit anim id est laborum.") {}
 
 protected:
-  virtual void SetUp()
+  void SetUp() override
   {
     TemporaryDirectoryTest::SetUp();
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/5affcfd6/3rdparty/stout/tests/subcommand_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/tests/subcommand_tests.cpp b/3rdparty/stout/tests/subcommand_tests.cpp
index 211d28d..ad71c96 100644
--- a/3rdparty/stout/tests/subcommand_tests.cpp
+++ b/3rdparty/stout/tests/subcommand_tests.cpp
@@ -87,8 +87,8 @@ public:
   Flags flags;
 
 protected:
-  virtual int execute() { return 0; }
-  virtual flags::FlagsBase* getFlags() { return &flags; }
+  int execute() override { return 0; }
+  flags::FlagsBase* getFlags() override { return &flags; }
 };