Skip to content

Commit

Permalink
Use const references
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound authored and zcbenz committed Dec 5, 2017
1 parent 0ddd078 commit 448ccc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions atom/browser/api/atom_api_window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ Window::~Window() {
}

std::vector<base::FilePath::StringType> 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());
Expand Down
4 changes: 2 additions & 2 deletions atom/browser/api/atom_api_window.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ class Window : public mate::TrackableObject<Window>,

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<base::FilePath::StringType> GetGlobalPreloads();

protected:
Expand Down

0 comments on commit 448ccc2

Please sign in to comment.