Pass by const reference. Thanks Andre and Peter.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22405 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-01-06 18:17:25 +00:00
parent 04192aa3ab
commit 0fce3ff6bd
4 changed files with 6 additions and 6 deletions

View File

@ -1425,7 +1425,7 @@ vector<string> const & BufferParams::getModules() const {
bool BufferParams::addLayoutModule(string modName) { bool BufferParams::addLayoutModule(string const & modName) {
LayoutModuleList::const_iterator it = layoutModules_.begin(); LayoutModuleList::const_iterator it = layoutModules_.begin();
LayoutModuleList::const_iterator end = layoutModules_.end(); LayoutModuleList::const_iterator end = layoutModules_.end();
for (; it != end; it++) { for (; it != end; it++) {

View File

@ -133,7 +133,7 @@ public:
/// need not be done if we know this isn't the final time through, or if /// need not be done if we know this isn't the final time through, or if
/// the BufferParams do not represent the parameters for an actual buffer /// the BufferParams do not represent the parameters for an actual buffer
/// (as in GuiDocument). /// (as in GuiDocument).
bool addLayoutModule(std::string modName); bool addLayoutModule(std::string const & modName);
/// Clear the list /// Clear the list
void clearLayoutModules(); void clearLayoutModules();

View File

@ -34,8 +34,8 @@ namespace lyx {
ModuleList moduleList; ModuleList moduleList;
LyXModule::LyXModule(string n, string f, string d, LyXModule::LyXModule(string const & n, string const & f,
vector<string> p) : string const & d, vector<string> const & p) :
name(n), filename(f), description(d), packageList(p), checked(false) name(n), filename(f), description(d), packageList(p), checked(false)
{} {}

View File

@ -28,8 +28,8 @@ namespace lyx {
class LyXModule { class LyXModule {
public: public:
/// ///
LyXModule(std::string n, std::string f, std::string d, LyXModule(std::string const & n, std::string const & f,
std::vector<std::string> p); std::string const & d, std::vector<std::string> const & p);
/// whether the required packages are available /// whether the required packages are available
bool isAvailable(); bool isAvailable();
/// what appears in the ui /// what appears in the ui