mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-12 11:32:21 +00:00
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:
parent
db5e9cf961
commit
966c6e0a16
@ -1,5 +1,10 @@
|
|||||||
1999-10-23 Lars Gullik Bjønnes <larsbj@lyx.org>
|
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
|
* src/support/Makefile.am (libsupport_a_SOURCES): added LIstream.h
|
||||||
and LOstream.h
|
and LOstream.h
|
||||||
|
|
||||||
|
@ -315,7 +315,7 @@ dnl has a working stl string container, the check is really stupid
|
|||||||
dnl and could need some improvement.
|
dnl and could need some improvement.
|
||||||
AC_DEFUN(LYX_CXX_STL_STRING,[
|
AC_DEFUN(LYX_CXX_STL_STRING,[
|
||||||
AC_REQUIRE([LYX_PROG_CXX])
|
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,[
|
AC_ARG_WITH(included-string,[
|
||||||
--with-included-string use LyX string class instead of STL string
|
--with-included-string use LyX string class instead of STL string
|
||||||
],[
|
],[
|
||||||
|
@ -296,8 +296,6 @@ void LyXFileDlg::Reread()
|
|||||||
// factor for what is considered "the future", to
|
// factor for what is considered "the future", to
|
||||||
// allow for NFS server/client clock disagreement.
|
// allow for NFS server/client clock disagreement.
|
||||||
// Show the year instead of the time of day.
|
// Show the year instead of the time of day.
|
||||||
#warning fix!
|
|
||||||
|
|
||||||
Time.erase(10, 9);
|
Time.erase(10, 9);
|
||||||
Time.erase(15, string::npos);
|
Time.erase(15, string::npos);
|
||||||
} else {
|
} else {
|
||||||
|
@ -4058,8 +4058,7 @@ void UpdateInsetUpdateList()
|
|||||||
void addNewlineAndDepth(string &file, int const depth)
|
void addNewlineAndDepth(string &file, int const depth)
|
||||||
{
|
{
|
||||||
file += '\n';
|
file += '\n';
|
||||||
for (int j=0;j< depth;j++)
|
file.append(' ', depth);
|
||||||
file += ' ';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,9 +23,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#ifdef WITH_WARNINGS
|
|
||||||
#warning Is it safe to use 'using' unconditionnally?
|
|
||||||
#endif
|
|
||||||
using std::max;
|
using std::max;
|
||||||
|
|
||||||
#include "lyx_main.h"
|
#include "lyx_main.h"
|
||||||
|
@ -70,7 +70,7 @@ struct lyxstring::Srep {
|
|||||||
Srep * get_own_copy()
|
Srep * get_own_copy()
|
||||||
{
|
{
|
||||||
if (ref == 1) return this;
|
if (ref == 1) return this;
|
||||||
ref--;
|
--ref;
|
||||||
return new Srep(sz, s);
|
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];
|
value_type * tmp = new value_type[n];
|
||||||
memset(tmp, c, n);
|
memset(tmp, c, n);
|
||||||
rep = rep->get_own_copy();
|
rep = rep->get_own_copy();
|
||||||
rep->assign(n, tmp);
|
rep->append(n, tmp);
|
||||||
delete[] tmp;
|
delete[] tmp;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user