]> git.lyx.org Git - features.git/commitdiff
Pass by const reference. Thanks Andre and Peter.
authorRichard Heck <rgheck@comcast.net>
Sun, 6 Jan 2008 18:17:25 +0000 (18:17 +0000)
committerRichard Heck <rgheck@comcast.net>
Sun, 6 Jan 2008 18:17:25 +0000 (18:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22405 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferParams.cpp
src/BufferParams.h
src/ModuleList.cpp
src/ModuleList.h

index bc316e24f43558535c094f87b01da8a96392d0a8..78c4f854942b0f3a2e399abc7b868b7a775bc1ff 100644 (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++) {
index 5dc05b3c38cbd2a58d270b47b6a491cfde429ea4..36ab933e4cc7d41df298376b8f0a592b7b1936dd 100644 (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();
 
index cd282ea70a5fdae65224c6700fde2ac140109d2d..d1ff3bee0a368d5d23767bc1939eb676b16d51d7 100644 (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)
 {}
 
index 2f530e931ade8accf439a04071be1ef36dbc8810..5c22db30365d56f6e700ea097ebc33d341564d16 100644 (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