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
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
],[
// 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 {
void addNewlineAndDepth(string &file, int const depth)
{
file += '\n';
- for (int j=0;j< depth;j++)
- file += ' ';
+ file.append(' ', depth);
}
#endif
#include <algorithm>
-#ifdef WITH_WARNINGS
-#warning Is it safe to use 'using' unconditionnally?
-#endif
using std::max;
#include "lyx_main.h"
Srep * get_own_copy()
{
if (ref == 1) return this;
- ref--;
+ --ref;
return new Srep(sz, s);
}
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;
}