Return-Path: X-Original-To: apmail-mesos-commits-archive@www.apache.org Delivered-To: apmail-mesos-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 19342182DE for ; Thu, 11 Feb 2016 23:24:47 +0000 (UTC) Received: (qmail 30485 invoked by uid 500); 11 Feb 2016 23:24:46 -0000 Delivered-To: apmail-mesos-commits-archive@mesos.apache.org Received: (qmail 30456 invoked by uid 500); 11 Feb 2016 23:24:46 -0000 Mailing-List: contact commits-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mesos.apache.org Delivered-To: mailing list commits@mesos.apache.org Received: (qmail 30446 invoked by uid 99); 11 Feb 2016 23:24:46 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Feb 2016 23:24:46 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A41BFE0534; Thu, 11 Feb 2016 23:24:46 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jieyu@apache.org To: commits@mesos.apache.org Date: Thu, 11 Feb 2016 23:24:46 -0000 Message-Id: <900a17b7169c494cad25e47a6fc2160b@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/3] mesos git commit: Added const qualifier for uri::Fetcher::fetch. 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 Authored: Thu Feb 11 15:10:33 2016 -0800 Committer: Jie Yu 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 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> create(const Option& _flags) Future 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 {