[Cmake-commits] CMake branch, next, updated. v3.6.2-2510-g022bd40

Brad King brad.king at kitware.com
Mon Sep 26 14:34:22 EDT 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  022bd40319d609099d836bd40fd67ce58f3ce7b2 (commit)
       via  56e7dc9d98c964ca7ce87c2484597e12982af2a2 (commit)
      from  8b91d5f6730301176bcef83f689267ec433887ef (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=022bd40319d609099d836bd40fd67ce58f3ce7b2
commit 022bd40319d609099d836bd40fd67ce58f3ce7b2
Merge: 8b91d5f 56e7dc9
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 26 14:34:22 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Sep 26 14:34:22 2016 -0400

    Merge topic 'cmake-server-basic-commands' into next
    
    56e7dc9d Revise style in topic 'cmake-server-basic-commands'


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=56e7dc9d98c964ca7ce87c2484597e12982af2a2
commit 56e7dc9d98c964ca7ce87c2484597e12982af2a2
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 26 14:34:03 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Sep 26 14:34:03 2016 -0400

    Revise style in topic 'cmake-server-basic-commands'

diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx
index cf886be..134edf3 100644
--- a/Source/cmServerProtocol.cxx
+++ b/Source/cmServerProtocol.cxx
@@ -280,14 +280,18 @@ const cmServerResponse cmServerProtocol1_0::Process(
 {
   assert(this->m_State >= STATE_ACTIVE);
 
-  if (request.Type == kCOMPUTE_TYPE)
+  if (request.Type == kCOMPUTE_TYPE) {
     return this->ProcessCompute(request);
-  if (request.Type == kCONFIGURE_TYPE)
+  }
+  if (request.Type == kCONFIGURE_TYPE) {
     return this->ProcessConfigure(request);
-  if (request.Type == kGLOBAL_SETTINGS_TYPE)
+  }
+  if (request.Type == kGLOBAL_SETTINGS_TYPE) {
     return this->ProcessGlobalSettings(request);
-  if (request.Type == kSET_GLOBAL_SETTINGS_TYPE)
+  }
+  if (request.Type == kSET_GLOBAL_SETTINGS_TYPE) {
     return this->ProcessSetGlobalSettings(request);
+  }
 
   return request.ReportError("Unknown command!");
 }
@@ -312,10 +316,9 @@ cmServerResponse cmServerProtocol1_0::ProcessCompute(
 
   if (ret < 0) {
     return request.ReportError("Failed to compute build system.");
-  } else {
-    m_State = STATE_COMPUTED;
-    return request.Reply(Json::Value());
   }
+  m_State = STATE_COMPUTED;
+  return request.Reply(Json::Value());
 }
 
 cmServerResponse cmServerProtocol1_0::ProcessConfigure(
@@ -399,10 +402,9 @@ cmServerResponse cmServerProtocol1_0::ProcessConfigure(
   int ret = cm->Configure();
   if (ret < 0) {
     return request.ReportError("Configuration failed.");
-  } else {
-    m_State = STATE_CONFIGURED;
-    return request.Reply(Json::Value());
   }
+  m_State = STATE_CONFIGURED;
+  return request.Reply(Json::Value());
 }
 
 cmServerResponse cmServerProtocol1_0::ProcessGlobalSettings(
@@ -437,8 +439,9 @@ cmServerResponse cmServerProtocol1_0::ProcessGlobalSettings(
 static void setBool(const cmServerRequest& request, const std::string& key,
                     std::function<void(bool)> setter)
 {
-  if (request.Data[key].isNull())
+  if (request.Data[key].isNull()) {
     return;
+  }
   setter(request.Data[key].asBool());
 }
 

-----------------------------------------------------------------------

Summary of changes:
 Source/cmServerProtocol.cxx |   25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list