From 4e12c0e35c2be9e2d9dc5a1d218e93b25598c9a0 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 16 Jul 2019 21:40:30 +0100 Subject: Repo should be const --- gentoobrowse-api/service/maintenanceGitOperations.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gentoobrowse-api/service/maintenanceGitOperations.cpp b/gentoobrowse-api/service/maintenanceGitOperations.cpp index 3249e0a..1b59e43 100644 --- a/gentoobrowse-api/service/maintenanceGitOperations.cpp +++ b/gentoobrowse-api/service/maintenanceGitOperations.cpp @@ -131,7 +131,7 @@ namespace Gentoo { writeChangesToFileList(int64_t repoId, git_repository * repo, const git_oid & last, const git_oid & head); ChangeSet - refreshRepository(DB::Connection * db, Ice::PropertiesPtr properties, Repository & repository) + refreshRepository(DB::Connection * db, Ice::PropertiesPtr properties, const Repository & repository) { auto targetRef = properties->getProperty("GentooBrowseAPI.RefreshTarget." + repository.name); auto repo = gitSafeGet(git_repository_open, git_repository_free, repository.path.c_str()); @@ -170,7 +170,7 @@ namespace Gentoo { auto repoRoot = std::filesystem::path(properties->getPropertyWithDefault("GentooBrowseAPI.RepoRoot", "/")); auto dbc = db->get(); DB::TransactionScope tx(*dbc.get()); - for (auto & repo : fetch(dbc.get(), sql::maintenance::reposToGitRefresh)) { + for (const auto & repo : fetch(dbc.get(), sql::maintenance::reposToGitRefresh)) { auto changes = refreshRepository(dbc.get(), properties, repo); this->applyFileChanges(dbc.get(), repoRoot, repo, changes); } -- cgit v1.2.3