mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mp...@apache.org
Subject [1/3] mesos git commit: Removed `void` parameters in mesos.
Date Wed, 20 Jan 2016 23:39:25 GMT
Repository: mesos
Updated Branches:
  refs/heads/master 037e0f83e -> 4d4d71664


Removed `void` parameters in mesos.


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

Branch: refs/heads/master
Commit: 4d4d7166414f0ebd8d5e40df34070446098a3c91
Parents: 05f9fb2
Author: Michael Park <mpark@apache.org>
Authored: Wed Jan 20 14:15:15 2016 -0800
Committer: Michael Park <mpark@apache.org>
Committed: Wed Jan 20 15:29:05 2016 -0800

----------------------------------------------------------------------
 configure.ac                                  |  8 ++++----
 include/mesos/v1/scheduler.hpp                |  4 ++--
 m4/ax_pthread.m4                              |  2 +-
 src/master/validation.cpp                     |  8 ++++----
 src/python/native/src/mesos/native/module.cpp |  2 +-
 src/scheduler/scheduler.cpp                   | 12 ++++++------
 src/tests/master_maintenance_tests.cpp        |  4 ++--
 src/tests/registrar_tests.cpp                 |  2 +-
 src/tests/scheduler_tests.cpp                 |  4 ++--
 9 files changed, 23 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/4d4d7166/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 40d60a6..70d1687 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1155,7 +1155,7 @@ set to an older version of Python.
   # Render code that imports from the standard C++ library.
   cat <<__EOF__ >testlib.cpp [
 #include <string>
-std::string test(void)
+std::string test()
 {
   return std::string("42");
 }]
@@ -1171,8 +1171,8 @@ __EOF__
 #include <Python.h>
 #include <string>
 
-std::string test(void);
-PyMODINIT_FUNC initminimal(void);
+std::string test();
+PyMODINIT_FUNC initminimal();
 
 static PyObject *minimal_test(PyObject *self, PyObject* args)
 {
@@ -1184,7 +1184,7 @@ static PyMethodDef minimal_methods[] = {
   { NULL, NULL }
 };
 
-PyMODINIT_FUNC initminimal(void)
+PyMODINIT_FUNC initminimal()
 {
   PyImport_AddModule("minimal");
   Py_InitModule("minimal", minimal_methods);

http://git-wip-us.apache.org/repos/asf/mesos/blob/4d4d7166/include/mesos/v1/scheduler.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/v1/scheduler.hpp b/include/mesos/v1/scheduler.hpp
index fc8ae50..5e462c1 100644
--- a/include/mesos/v1/scheduler.hpp
+++ b/include/mesos/v1/scheduler.hpp
@@ -46,8 +46,8 @@ class Mesos
 public:
   Mesos(const std::string& master,
         ContentType contentType,
-        const std::function<void(void)>& connected,
-        const std::function<void(void)>& disconnected,
+        const std::function<void()>& connected,
+        const std::function<void()>& disconnected,
         const std::function<void(const std::queue<Event>&)>& received);
 
   // Delete copy constructor.

http://git-wip-us.apache.org/repos/asf/mesos/blob/4d4d7166/m4/ax_pthread.m4
----------------------------------------------------------------------
diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4
index d383ad5..0b2071d 100644
--- a/m4/ax_pthread.m4
+++ b/m4/ax_pthread.m4
@@ -172,7 +172,7 @@ AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags])
 save_CFLAGS="$CFLAGS"
 ax_pthread_extra_flags="-Werror"
 CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument"
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo();],[foo()])],
                   [AC_MSG_RESULT([yes])],
                   [ax_pthread_extra_flags=
                    AC_MSG_RESULT([no])])

http://git-wip-us.apache.org/repos/asf/mesos/blob/4d4d7166/src/master/validation.cpp
----------------------------------------------------------------------
diff --git a/src/master/validation.cpp b/src/master/validation.cpp
index 98360b6..222bb34 100644
--- a/src/master/validation.cpp
+++ b/src/master/validation.cpp
@@ -495,7 +495,7 @@ Option<Error> validate(
   // executed does matter! For example, 'validateResourceUsage'
   // assumes that ExecutorInfo is valid which is verified by
   // 'validateExecutorInfo'.
-  vector<lambda::function<Option<Error>(void)>> validators = {
+  vector<lambda::function<Option<Error>()>> validators = {
     lambda::bind(internal::validateTaskID, task),
     lambda::bind(internal::validateUniqueTaskID, task, framework),
     lambda::bind(internal::validateSlaveID, task, slave),
@@ -509,7 +509,7 @@ Option<Error> validate(
 
   // TODO(jieyu): Add a validateCommandInfo function.
 
-  foreach (const lambda::function<Option<Error>(void)>& validator, validators)
{
+  foreach (const lambda::function<Option<Error>()>& validator, validators)
{
     Option<Error> error = validator();
     if (error.isSome()) {
       return error;
@@ -629,13 +629,13 @@ Option<Error> validate(
   CHECK_NOTNULL(master);
   CHECK_NOTNULL(framework);
 
-  vector<lambda::function<Option<Error>(void)>> validators = {
+  vector<lambda::function<Option<Error>()>> validators = {
     lambda::bind(validateUniqueOfferID, offerIds),
     lambda::bind(validateFramework, offerIds, master, framework),
     lambda::bind(validateSlave, offerIds, master)
   };
 
-  foreach (const lambda::function<Option<Error>(void)>& validator, validators)
{
+  foreach (const lambda::function<Option<Error>()>& validator, validators)
{
     Option<Error> error = validator();
     if (error.isSome()) {
       return error;

http://git-wip-us.apache.org/repos/asf/mesos/blob/4d4d7166/src/python/native/src/mesos/native/module.cpp
----------------------------------------------------------------------
diff --git a/src/python/native/src/mesos/native/module.cpp b/src/python/native/src/mesos/native/module.cpp
index 6e672a2..9237361 100644
--- a/src/python/native/src/mesos/native/module.cpp
+++ b/src/python/native/src/mesos/native/module.cpp
@@ -71,7 +71,7 @@ PyMethodDef MODULE_METHODS[] = {
 /**
  * Entry point called by Python to initialize our module.
  */
-PyMODINIT_FUNC init_mesos(void)
+PyMODINIT_FUNC init_mesos()
 {
   // Ensure that the interpreter's threading support is enabled.
   PyEval_InitThreads();

http://git-wip-us.apache.org/repos/asf/mesos/blob/4d4d7166/src/scheduler/scheduler.cpp
----------------------------------------------------------------------
diff --git a/src/scheduler/scheduler.cpp b/src/scheduler/scheduler.cpp
index a17872b..99a7d0d 100644
--- a/src/scheduler/scheduler.cpp
+++ b/src/scheduler/scheduler.cpp
@@ -105,8 +105,8 @@ public:
   MesosProcess(
       const string& master,
       ContentType _contentType,
-      const lambda::function<void(void)>& _connected,
-      const lambda::function<void(void)>& _disconnected,
+      const lambda::function<void()>& _connected,
+      const lambda::function<void()>& _disconnected,
       lambda::function<void(const queue<Event>&)> _received)
     : ProcessBase(ID::generate("scheduler")),
       contentType(_contentType),
@@ -494,8 +494,8 @@ private:
 
   Mutex mutex; // Used to serialize the callback invocations.
 
-  lambda::function<void(void)> connected;
-  lambda::function<void(void)> disconnected;
+  lambda::function<void()> connected;
+  lambda::function<void()> disconnected;
   lambda::function<void(const queue<Event>&)> received;
 
   bool local; // Whether or not we launched a local cluster.
@@ -513,8 +513,8 @@ private:
 Mesos::Mesos(
     const string& master,
     ContentType contentType,
-    const lambda::function<void(void)>& connected,
-    const lambda::function<void(void)>& disconnected,
+    const lambda::function<void()>& connected,
+    const lambda::function<void()>& disconnected,
     const lambda::function<void(const queue<Event>&)>& received)
 {
   process = new MesosProcess(

http://git-wip-us.apache.org/repos/asf/mesos/blob/4d4d7166/src/tests/master_maintenance_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_maintenance_tests.cpp b/src/tests/master_maintenance_tests.cpp
index 2da6a2d..b98eede 100644
--- a/src/tests/master_maintenance_tests.cpp
+++ b/src/tests/master_maintenance_tests.cpp
@@ -156,8 +156,8 @@ protected:
   class Callbacks
   {
   public:
-    MOCK_METHOD0(connected, void(void));
-    MOCK_METHOD0(disconnected, void(void));
+    MOCK_METHOD0(connected, void());
+    MOCK_METHOD0(disconnected, void());
     MOCK_METHOD1(received, void(const std::queue<Event>&));
   };
 };

http://git-wip-us.apache.org/repos/asf/mesos/blob/4d4d7166/src/tests/registrar_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/registrar_tests.cpp b/src/tests/registrar_tests.cpp
index 8374742..58b3fcc 100644
--- a/src/tests/registrar_tests.cpp
+++ b/src/tests/registrar_tests.cpp
@@ -920,7 +920,7 @@ public:
   MOCK_METHOD1(get, Future<Option<Entry> >(const string&));
   MOCK_METHOD2(set, Future<bool>(const Entry&, const UUID&));
   MOCK_METHOD1(expunge, Future<bool>(const Entry&));
-  MOCK_METHOD0(names, Future<std::set<string> >(void));
+  MOCK_METHOD0(names, Future<std::set<string>>());
 };
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/4d4d7166/src/tests/scheduler_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/scheduler_tests.cpp b/src/tests/scheduler_tests.cpp
index 6743210..4e2db2a 100644
--- a/src/tests/scheduler_tests.cpp
+++ b/src/tests/scheduler_tests.cpp
@@ -84,8 +84,8 @@ protected:
   class Callbacks
   {
   public:
-    MOCK_METHOD0(connected, void(void));
-    MOCK_METHOD0(disconnected, void(void));
+    MOCK_METHOD0(connected, void());
+    MOCK_METHOD0(disconnected, void());
     MOCK_METHOD1(received, void(const std::queue<Event>&));
   };
 };


Mime
View raw message