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 end = layoutModules_.end();
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
/// the BufferParams do not represent the parameters for an actual buffer
/// (as in GuiDocument).
bool addLayoutModule(std::string modName);
bool addLayoutModule(std::string const & modName);
/// Clear the list
void clearLayoutModules();

View File

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

View File

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