This is an automated email from the ASF dual-hosted git repository.

chhsiao pushed a commit to branch 1.7.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 58548afa35ae8a4e8cf1efc3652712788d04fdf9
Author: Benjamin Bannier <bbann...@apache.org>
AuthorDate: Wed Oct 24 09:59:03 2018 +0200

    Renamed a function argument to not reuse member name.
    
    While a function argument shadowing a member variable is perfectly
    legal, it is still confusing. In this patch we rename the function
    argument to remove one case of such shadowing.
    
    Review: https://reviews.apache.org/r/69161
---
 src/resource_provider/storage/provider.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/resource_provider/storage/provider.cpp 
b/src/resource_provider/storage/provider.cpp
index 2d8d08d..e931300 100644
--- a/src/resource_provider/storage/provider.cpp
+++ b/src/resource_provider/storage/provider.cpp
@@ -414,7 +414,7 @@ private:
   void dropOperation(
       const id::UUID& operationUuid,
       const Option<FrameworkID>& frameworkId,
-      const Option<Offer::Operation>& info,
+      const Option<Offer::Operation>& operation,
       const string& message);
 
   Future<vector<ResourceConversion>> applyCreateDisk(
@@ -3064,7 +3064,7 @@ Future<Nothing> 
StorageLocalResourceProviderProcess::_applyOperation(
 void StorageLocalResourceProviderProcess::dropOperation(
     const id::UUID& operationUuid,
     const Option<FrameworkID>& frameworkId,
-    const Option<Offer::Operation>& info,
+    const Option<Offer::Operation>& operation,
     const string& message)
 {
   LOG(WARNING)
@@ -3075,8 +3075,8 @@ void StorageLocalResourceProviderProcess::dropOperation(
        protobuf::createUUID(operationUuid),
        protobuf::createOperationStatus(
            OPERATION_DROPPED,
-           info.isSome() && info->has_id()
-             ? info->id() : Option<OperationID>::none(),
+           operation.isSome() && operation->has_id()
+             ? operation->id() : Option<OperationID>::none(),
            message,
            None(),
            id::UUID::random()),
@@ -3096,7 +3096,7 @@ void StorageLocalResourceProviderProcess::dropOperation(
     .onDiscarded(defer(self(), std::bind(die, "future discarded")));
 
   ++metrics.operations_dropped.at(
-      info.isSome() ? info->type() : Offer::Operation::UNKNOWN);
+      operation.isSome() ? operation->type() : Offer::Operation::UNKNOWN);
 }
 
 

Reply via email to