]> git.lyx.org Git - features.git/commitdiff
removed some warnings, fixed a bug in lyxstring
authorLars Gullik Bjønnes <larsbj@gullik.org>
Sat, 23 Oct 1999 20:52:00 +0000 (20:52 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Sat, 23 Oct 1999 20:52:00 +0000 (20:52 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@234 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
acinclude.m4
src/filedlg.C
src/lyx_cb.C
src/mathed/math_symbols.C
src/support/lyxstring.C

index df5c74a7790fc395b7b0840aa40430034ad20201..ffed178dd2f3e37f0f035ca6be1ad9000ce3e007 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 1999-10-23  Lars Gullik Bjønnes  <larsbj@lyx.org>
 
+       * src/lyx_cb.C (addNewlineAndDepth): changed to use string::append.
+
+       * src/support/lyxstring.C (append): fixed something that must be a
+       bug, rep->assign was used instead of rep->append.
+
        * src/support/Makefile.am (libsupport_a_SOURCES): added LIstream.h
        and LOstream.h
 
index 7d85682b38979c56487f2b6e81d24f21ca1749fe..6272722dc55625defa569a17e0e3f542c0c17679 100644 (file)
@@ -315,7 +315,7 @@ dnl   has a working stl string container, the check is really stupid
 dnl   and could need some improvement.
 AC_DEFUN(LYX_CXX_STL_STRING,[
     AC_REQUIRE([LYX_PROG_CXX])
-    AC_MSG_CHECKING(Use the included std::string)
+    AC_MSG_CHECKING(whether the included std::string should be used)
     AC_ARG_WITH(included-string,[
        --with-included-string  use LyX string class instead of STL string
     ],[
index 2369672d98fd5777a0799e4ad3ca75eb07963344..d8b732be83ae7d23a57cd549fcc311d451dee5a8 100644 (file)
@@ -296,8 +296,6 @@ void LyXFileDlg::Reread()
                        // factor for what is considered "the future", to
                        // allow for NFS server/client clock disagreement.
                        // Show the year instead of the time of day.
-#warning fix!
-                       
                        Time.erase(10, 9);
                        Time.erase(15, string::npos);
                } else {
index c84a087606718d6c4207c5648940c612c1622c6f..a8391913200b9f7f9d6707ff882ade54b72d8514 100644 (file)
@@ -4058,8 +4058,7 @@ void UpdateInsetUpdateList()
 void addNewlineAndDepth(string &file, int const depth)
 {
        file += '\n';
-       for (int j=0;j< depth;j++)
-               file += ' ';
+       file.append(' ', depth);
 }
 
 
index de333c6e0b4ffb9763eabdbf47c880facb651ea8..f3dfd3a451e73cd3a1c7acfc14abb648f52582e0 100644 (file)
@@ -23,9 +23,6 @@
 #endif
 
 #include <algorithm>
-#ifdef WITH_WARNINGS
-#warning Is it safe to use 'using' unconditionnally? 
-#endif
 using std::max;
 
 #include "lyx_main.h"
index 3cd13e4771213899c78e088d9354d27d0808d1f7..32ab71c6a8b3a39dbeef231cc845311abaecb929 100644 (file)
@@ -70,7 +70,7 @@ struct lyxstring::Srep {
        Srep * get_own_copy()
                {
                        if (ref == 1) return this;
-                       ref--;
+                       --ref;
                        return new Srep(sz, s);
                }
        
@@ -749,7 +749,7 @@ lyxstring & lyxstring::append(size_type n, value_type c)
        value_type * tmp = new value_type[n];
        memset(tmp, c, n);
        rep = rep->get_own_copy();
-       rep->assign(n, tmp);
+       rep->append(n, tmp);
        delete[] tmp;
        return *this;
 }