Refactored as suggested by Floessie #5183

This commit is contained in:
Morgan Hardwood
2019-03-10 22:29:32 +01:00
parent d080bba351
commit 2155cf76f0
2 changed files with 6 additions and 10 deletions

View File

@@ -1779,9 +1779,7 @@ void FileBrowser::openNextImage()
}
// open the selected image
std::vector<Thumbnail*> entries;
entries.push_back(thumb);
tbl->openRequested(entries);
tbl->openRequested({thumb});
return;
}
@@ -1844,9 +1842,7 @@ void FileBrowser::openPrevImage()
}
// open the selected image
std::vector<Thumbnail*> entries;
entries.push_back(thumb);
tbl->openRequested(entries);
tbl->openRequested({thumb});
return;
}
@@ -1857,7 +1853,7 @@ void FileBrowser::openPrevImage()
}
}
void FileBrowser::selectImage(Glib::ustring fname)
void FileBrowser::selectImage(const Glib::ustring& fname)
{
MYWRITERLOCK(l, entryRW);
@@ -1903,7 +1899,7 @@ void FileBrowser::selectImage(Glib::ustring fname)
}
}
void FileBrowser::openNextPreviousEditorImage (Glib::ustring fname, eRTNav nextPrevious)
void FileBrowser::openNextPreviousEditorImage (const Glib::ustring& fname, eRTNav nextPrevious)
{
// let FileBrowser acquire Editor's perspective

View File

@@ -183,12 +183,12 @@ public:
void openNextImage();
void openPrevImage();
void selectImage(Glib::ustring fname);
void selectImage(const Glib::ustring& fname);
void copyProfile ();
void pasteProfile ();
void partPasteProfile ();
void openNextPreviousEditorImage (Glib::ustring fname, eRTNav eNextPrevious);
void openNextPreviousEditorImage(const Glib::ustring& fname, eRTNav eNextPrevious);
#ifdef WIN32
void openDefaultViewer (int destination);