From 448ccc261de6f42886b48efa36ac48e44312e232 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Tue, 5 Sep 2017 18:01:27 +1000 Subject: [PATCH] Use const references --- atom/browser/api/atom_api_window.cc | 4 ++-- atom/browser/api/atom_api_window.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/atom/browser/api/atom_api_window.cc b/atom/browser/api/atom_api_window.cc index 372bf3d1e0533..041601057fae2 100644 --- a/atom/browser/api/atom_api_window.cc +++ b/atom/browser/api/atom_api_window.cc @@ -177,10 +177,10 @@ Window::~Window() { } std::vector g_preloads; -void Window::AddGlobalPreload(const base::FilePath::StringType preloadPath) { +void Window::AddGlobalPreload(const base::FilePath::StringType& preloadPath) { g_preloads.push_back(preloadPath); } -void Window::RemoveGlobalPreload(const base::FilePath::StringType preloadPath) { +void Window::RemoveGlobalPreload(const base::FilePath::StringType& preloadPath) { g_preloads.erase( std::remove(g_preloads.begin(), g_preloads.end(), preloadPath), g_preloads.end()); diff --git a/atom/browser/api/atom_api_window.h b/atom/browser/api/atom_api_window.h index 3602fbd2f747f..3043392188879 100644 --- a/atom/browser/api/atom_api_window.h +++ b/atom/browser/api/atom_api_window.h @@ -54,8 +54,8 @@ class Window : public mate::TrackableObject, int32_t ID() const; - static void AddGlobalPreload(const base::FilePath::StringType preloadPath); - static void RemoveGlobalPreload(const base::FilePath::StringType preloadPath); + static void AddGlobalPreload(const base::FilePath::StringType& preloadPath); + static void RemoveGlobalPreload(const base::FilePath::StringType& preloadPath); static std::vector GetGlobalPreloads(); protected: