removed some warnings, fixed a bug in lyxstring

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@234 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 1999-10-23 20:52:00 +00:00
parent db5e9cf961
commit 966c6e0a16
6 changed files with 9 additions and 10 deletions

View File

@ -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

View 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
],[

View 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 {

View 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);
}

View 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"

View 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;
}