From 966c6e0a168c77888aeea9afc680621596752ff2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Sat, 23 Oct 1999 20:52:00 +0000 Subject: [PATCH] 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 --- ChangeLog | 5 +++++ acinclude.m4 | 2 +- src/filedlg.C | 2 -- src/lyx_cb.C | 3 +-- src/mathed/math_symbols.C | 3 --- src/support/lyxstring.C | 4 ++-- 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index df5c74a779..ffed178dd2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 1999-10-23 Lars Gullik Bjønnes + * 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 diff --git a/acinclude.m4 b/acinclude.m4 index 7d85682b38..6272722dc5 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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 ],[ diff --git a/src/filedlg.C b/src/filedlg.C index 2369672d98..d8b732be83 100644 --- a/src/filedlg.C +++ b/src/filedlg.C @@ -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 { diff --git a/src/lyx_cb.C b/src/lyx_cb.C index c84a087606..a839191320 100644 --- a/src/lyx_cb.C +++ b/src/lyx_cb.C @@ -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); } diff --git a/src/mathed/math_symbols.C b/src/mathed/math_symbols.C index de333c6e0b..f3dfd3a451 100644 --- a/src/mathed/math_symbols.C +++ b/src/mathed/math_symbols.C @@ -23,9 +23,6 @@ #endif #include -#ifdef WITH_WARNINGS -#warning Is it safe to use 'using' unconditionnally? -#endif using std::max; #include "lyx_main.h" diff --git a/src/support/lyxstring.C b/src/support/lyxstring.C index 3cd13e4771..32ab71c6a8 100644 --- a/src/support/lyxstring.C +++ b/src/support/lyxstring.C @@ -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; } -- 2.39.2