Use const references
This commit is contained in:
parent
0ddd078aaf
commit
448ccc261d
2 changed files with 4 additions and 4 deletions
|
@ -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());
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue