mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ji...@apache.org
Subject [1/3] mesos git commit: Added const qualifier for uri::Fetcher::fetch.
Date Thu, 11 Feb 2016 23:24:46 GMT
Repository: mesos
Updated Branches:
  refs/heads/master e3a387f0d -> f89352f53


Added const qualifier for uri::Fetcher::fetch.

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


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

Branch: refs/heads/master
Commit: 1d276ace9d9d9d264f3d069b6262d079f5aa49fd
Parents: e3a387f
Author: Jojy Varghese <jojy@mesosphere.io>
Authored: Thu Feb 11 15:10:33 2016 -0800
Committer: Jie Yu <yujie.jay@gmail.com>
Committed: Thu Feb 11 15:10:33 2016 -0800

----------------------------------------------------------------------
 include/mesos/uri/fetcher.hpp | 2 +-
 src/uri/fetcher.cpp           | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/1d276ace/include/mesos/uri/fetcher.hpp
----------------------------------------------------------------------
diff --git a/include/mesos/uri/fetcher.hpp b/include/mesos/uri/fetcher.hpp
index baa32d3..3add35c 100644
--- a/include/mesos/uri/fetcher.hpp
+++ b/include/mesos/uri/fetcher.hpp
@@ -86,7 +86,7 @@ public:
   // TODO(jieyu): Consider using 'Path' for 'directory' here.
   process::Future<Nothing> fetch(
       const URI& uri,
-      const std::string& directory);
+      const std::string& directory) const;
 
 private:
   Fetcher(const Fetcher&) = delete; // Not copyable.

http://git-wip-us.apache.org/repos/asf/mesos/blob/1d276ace/src/uri/fetcher.cpp
----------------------------------------------------------------------
diff --git a/src/uri/fetcher.cpp b/src/uri/fetcher.cpp
index dfda732..2d8d5b1 100644
--- a/src/uri/fetcher.cpp
+++ b/src/uri/fetcher.cpp
@@ -78,13 +78,13 @@ Try<Owned<Fetcher>> create(const Option<Flags>&
_flags)
 
 Future<Nothing> Fetcher::fetch(
     const URI& uri,
-    const string& directory)
+    const string& directory) const
 {
   if (!plugins.contains(uri.scheme())) {
     return Failure("Scheme '" + uri.scheme() + "' is not supported");
   }
 
-  return plugins[uri.scheme()]->fetch(uri, directory);
+  return plugins.at(uri.scheme())->fetch(uri, directory);
 }
 
 } // namespace uri {


Mime
View raw message