diff --git a/ChangeLog b/ChangeLog
index 179ff7afd7..1644c8770f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2000-05-04 Jean-Marc Lasgouttes
+
+ * (various *.C files): add using std::foo directives to please dec
+ cxx.
+
+ * replace calls to string::clear() to string::erase() (Angus)
+
+ * src/cheaders/cmath: modified to provide std::abs.
+
2000-05-04 Juergen Vigna
* src/insets/insettext.C: Prepared all for inserting of multiple
diff --git a/src/Bullet.h b/src/Bullet.h
index c4c8203f8b..142de8bd9b 100644
--- a/src/Bullet.h
+++ b/src/Bullet.h
@@ -27,7 +27,7 @@
class Bullet {
public:
///
- Bullet(int f = -1, int c = -1, int s = -1);
+ Bullet(const int f = -1, const int c = -1, const int s = -1);
///
explicit Bullet(string const &);
diff --git a/src/Chktex.C b/src/Chktex.C
index 7779e14e2f..0dab6668c3 100644
--- a/src/Chktex.C
+++ b/src/Chktex.C
@@ -32,6 +32,7 @@
#include "gettext.h"
using std::ifstream;
+using std::getline;
/*
* CLASS Chktex
diff --git a/src/ImportNoweb.C b/src/ImportNoweb.C
index dfee627f82..450336d490 100644
--- a/src/ImportNoweb.C
+++ b/src/ImportNoweb.C
@@ -19,6 +19,7 @@
#include
using std::ifstream;
+using std::getline;
#include "ImportNoweb.h"
#include "lyxrc.h"
diff --git a/src/LaTeX.C b/src/LaTeX.C
index eb552063a9..951e5c91e0 100644
--- a/src/LaTeX.C
+++ b/src/LaTeX.C
@@ -33,6 +33,7 @@
#include "gettext.h"
using std::ifstream;
+using std::getline;
using std::endl;
// TODO: in no particular order
diff --git a/src/Literate.C b/src/Literate.C
index e66097f35c..7443d01cfd 100644
--- a/src/Literate.C
+++ b/src/Literate.C
@@ -29,6 +29,7 @@
#include "gettext.h"
using std::ifstream;
+using std::getline;
using std::endl;
extern BufferList bufferlist;
diff --git a/src/Spacing.C b/src/Spacing.C
index 746ee33f43..14261b665d 100644
--- a/src/Spacing.C
+++ b/src/Spacing.C
@@ -83,13 +83,10 @@ string Spacing::writeEnvirBegin() const
case Default: break; // do nothing
case Single:
return "\\begin{singlespace}";
- break;
case Onehalf:
return "\\begin{onehalfspace}";
- break;
case Double:
return "\\begin{doublespace}";
- break;
case Other:
#ifdef HAVE_SSTREAM
ostringstream ost;
@@ -105,7 +102,6 @@ string Spacing::writeEnvirBegin() const
return ost.str();
}
#endif
- break;
}
return string();
}
@@ -117,16 +113,12 @@ string Spacing::writeEnvirEnd() const
case Default: break; // do nothing
case Single:
return "\\end{singlespace}";
- break;
case Onehalf:
return "\\end{onehalfspace}";
- break;
case Double:
return "\\end{doublespace}";
- break;
case Other:
return "\\end{spacing}";
- break;
}
return string();
}
diff --git a/src/WorkArea.C b/src/WorkArea.C
index f93ca8c8ab..1fd3006829 100644
--- a/src/WorkArea.C
+++ b/src/WorkArea.C
@@ -24,7 +24,7 @@ using std::endl;
FL_OBJECT * figinset_canvas;
-// need to make the c++ compiler fint the correct version of abs.
+// need to make the c++ compiler find the correct version of abs.
// This is at least true for g++.
using std::abs;
@@ -65,7 +65,7 @@ WorkArea::WorkArea(BufferView * o, int xpos, int ypos, int width, int height)
<< width << 'x' << height << endl;
//
FL_OBJECT * obj;
- const int bw = int(abs(float(fl_get_border_width())));
+ const int bw = int(std::abs(float(fl_get_border_width())));
// We really want to get rid of figinset_canvas.
::figinset_canvas = figinset_canvas = obj =
@@ -162,7 +162,7 @@ void WorkArea::resize(int xpos, int ypos, int width, int height)
{
fl_freeze_all_forms();
- const int bw = int(abs(float(fl_get_border_width())));
+ const int bw = int(std::abs(float(fl_get_border_width())));
// a box
fl_set_object_geometry(backgroundbox, xpos, ypos, width - 15, height);
diff --git a/src/buffer.C b/src/buffer.C
index ff33b4b0b3..c589a1fa4c 100644
--- a/src/buffer.C
+++ b/src/buffer.C
@@ -125,7 +125,7 @@ Buffer::Buffer(string const & file, bool ronly)
lyxvc.buffer(this);
if (read_only || (lyxrc.use_tempdir)) {
tmppath = CreateBufferTmpDir();
- } else tmppath.clear();
+ } else tmppath.erase();
}
@@ -2278,7 +2278,7 @@ void Buffer::makeLinuxDocFile(string const & fname, int column)
// environment tag closing
for( ; depth > par->depth; --depth) {
sgmlCloseTag(ofs, depth, environment_stack[depth]);
- environment_stack[depth].clear();
+ environment_stack[depth].erase();
}
// write opening SGML tags
@@ -2287,7 +2287,7 @@ void Buffer::makeLinuxDocFile(string const & fname, int column)
if(depth == par->depth
&& !environment_stack[depth].empty()) {
sgmlCloseTag(ofs, depth, environment_stack[depth]);
- environment_stack[depth].clear();
+ environment_stack[depth].erase();
if(depth)
--depth;
else
@@ -2308,7 +2308,7 @@ void Buffer::makeLinuxDocFile(string const & fname, int column)
ofs << "
";
}
- environment_stack[depth].clear();
+ environment_stack[depth].erase();
sgmlOpenTag(ofs, depth, style.latexname());
break;
@@ -2320,11 +2320,11 @@ void Buffer::makeLinuxDocFile(string const & fname, int column)
sgmlCloseTag(ofs, depth,
environment_stack[depth]);
- environment_stack[depth].clear();
+ environment_stack[depth].erase();
}
if (depth < par->depth) {
depth = par->depth;
- environment_stack[depth].clear();
+ environment_stack[depth].erase();
}
if (environment_stack[depth] != style.latexname()) {
if(depth == 0) {
@@ -2448,7 +2448,7 @@ void Buffer::DocBookHandleFootnote(ostream & os, LyXParagraph * & par,
if(inner_span) {
if(!tmp_par.empty()) {
os << tmp_par;
- tmp_par.clear();
+ tmp_par.erase();
sgmlCloseTag(os, depth + 1, inner_tag);
sgmlOpenTag(os, depth + 1, inner_tag);
}
@@ -2461,7 +2461,7 @@ void Buffer::DocBookHandleFootnote(ostream & os, LyXParagraph * & par,
inner_tag);
if(!extra_par.empty()) os << extra_par;
if(!tag.empty()) sgmlCloseTag(os, depth, tag);
- extra_par.clear();
+ extra_par.erase();
switch (par->footnotekind) {
case LyXParagraph::FOOTNOTE:
@@ -2496,7 +2496,7 @@ void Buffer::DocBookHandleFootnote(ostream & os, LyXParagraph * & par,
if ((present == TAB_LIKE) || (present == FIG_LIKE)) {
DocBookHandleCaption(os, inner_tag, depth,
desc_on, par);
- inner_tag.clear();
+ inner_tag.erase();
} else {
sgmlOpenTag(os, depth + 1, inner_tag);
}
@@ -2873,8 +2873,8 @@ void Buffer::makeDocBookFile(string const & fname, int column)
}
sgmlCloseTag(ofs, depth + command_depth,
environment_stack[depth]);
- environment_stack[depth].clear();
- environment_inner[depth].clear();
+ environment_stack[depth].erase();
+ environment_inner[depth].erase();
}
if(depth == par->depth
@@ -2893,8 +2893,8 @@ void Buffer::makeDocBookFile(string const & fname, int column)
sgmlCloseTag(ofs, depth + command_depth,
environment_stack[depth]);
- environment_stack[depth].clear();
- environment_inner[depth].clear();
+ environment_stack[depth].erase();
+ environment_inner[depth].erase();
}
// Write opening SGML tags.
@@ -2965,7 +2965,7 @@ void Buffer::makeDocBookFile(string const & fname, int column)
case LATEX_ITEM_ENVIRONMENT:
if (depth < par->depth) {
depth = par->depth;
- environment_stack[depth].clear();
+ environment_stack[depth].erase();
}
if (environment_stack[depth] != style.latexname()) {
diff --git a/src/buffer.h b/src/buffer.h
index 991d166c78..8cfa12ad98 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -157,7 +157,7 @@ public:
// LaTeX all paragraphs from par to endpar,
// if endpar == 0 then to the end
//
- void latexParagraphs(ostream & os, LyXParagraph *par,
+ void latexParagraphs(std::ostream & os, LyXParagraph *par,
LyXParagraph *endpar, TexRow & texrow);
///
diff --git a/src/cheaders/cmath b/src/cheaders/cmath
index 21b276c619..465bbe3fab 100644
--- a/src/cheaders/cmath
+++ b/src/cheaders/cmath
@@ -1,80 +1,19 @@
// The -*- C++ -*- math functions header.
// This file is part of the GNU ANSI C++ Library.
+// Modified for use with LyX.
#ifndef __CMATH__
#define __CMATH__
-#ifdef __GNUG__
-#include <_G_config.h>
-#endif
-
#include
#ifdef __GNUG__
#pragma interface "cmath"
#endif
-extern "C++" {
-#if 0
-float acos (float);
-float asin (float);
-float atan (float);
-float atan2(float, float);
-float ceil (float);
-float cos (float);
-float cosh (float);
-float exp (float);
-float fabs (float);
-float floor(float);
-float fmod (float, float);
-float frexp(float, int*);
-float modf (float, float*);
-float ldexp(float, int);
-float log (float);
-float log10(float);
-float pow (float, float);
-float pow (float, int);
-float sin (float);
-float sinh (float);
-float sqrt (float);
-float tan (float);
-float tanh (float);
-#endif
-
-inline float abs (float x) { return fabs (x); }
-#if ! _G_MATH_H_INLINES /* hpux and SCO define this in math.h */
-inline double abs (double x) { return fabs (x); }
-#endif
-
-#if 0
-double pow(double, int);
-
-long double acos (long double);
-long double asin (long double);
-long double atan (long double);
-long double atan2(long double, long double);
-long double ceil (long double);
-long double cos (long double);
-long double cosh (long double);
-long double exp (long double);
-long double fabs (long double);
-long double floor(long double);
-long double frexp(long double, int*);
-long double fmod (long double, long double);
-long double frexp(long double, int*);
-long double log (long double);
-long double log10(long double);
-long double modf (long double, long double*);
-long double pow (long double, long double);
-long double pow (long double, int);
-long double sin (long double);
-long double sinh (long double);
-long double sqrt (long double);
-long double tan (long double);
-long double tanh (long double);
-#endif
-inline long double abs (long double x) { return fabs (x); }
-
-} // extern "C++"
+namespace std {
+ inline float abs (float x) { return fabs (x); }
+ inline double abs (double x) { return fabs (x); }
+}
#endif
diff --git a/src/chset.C b/src/chset.C
index b2b6a5ebe0..31d3f16243 100644
--- a/src/chset.C
+++ b/src/chset.C
@@ -13,6 +13,7 @@
#include "debug.h"
using std::ifstream;
+using std::getline;
using std::pair;
using std::make_pair;
using std::endl;
@@ -20,7 +21,7 @@ using std::endl;
bool CharacterSet::loadFile(string const & fname)
{
map_.clear();
- name_.clear();
+ name_.erase();
if (fname.empty() || fname == "ascii")
return true; // ascii 7-bit
diff --git a/src/filedlg.C b/src/filedlg.C
index 7c2650bf71..d1294f705b 100644
--- a/src/filedlg.C
+++ b/src/filedlg.C
@@ -421,7 +421,7 @@ void LyXFileDlg::SetButton(int iIndex, string const & pszName,
*pTemp = pszPath;
} else {
fl_hide_object(pObject);
- (*pTemp).clear();
+ (*pTemp).erase();
}
}
@@ -579,7 +579,7 @@ bool LyXFileDlg::HandleDoubleClick()
Temp += pszTemp;
} else {
// Directory higher up
- Temp.clear();
+ Temp.erase();
for (int i = 0; i < iSelect; ++i) {
string piece = fl_get_browser_line(pFileDlgForm->List, i+1);
// The '+2' is here to count the '@b' (JMarc)
diff --git a/src/insets/figinset.C b/src/insets/figinset.C
index c892ac2007..e39691c7d8 100644
--- a/src/insets/figinset.C
+++ b/src/insets/figinset.C
@@ -1768,7 +1768,7 @@ void InsetFig::CallbackFig(long arg)
} else {
if (!fname.empty()) {
changedfname = true;
- fname.clear();
+ fname.erase();
}
}
subcaption = fl_get_input(form->Subcaption);
diff --git a/src/insets/insetbib.C b/src/insets/insetbib.C
index 467f0bb718..7bebfb9d1f 100644
--- a/src/insets/insetbib.C
+++ b/src/insets/insetbib.C
@@ -2,6 +2,7 @@
#include
using std::ifstream;
+using std::getline;
#include
diff --git a/src/insets/insetfoot.C b/src/insets/insetfoot.C
index 07c8335353..50f6af9a84 100644
--- a/src/insets/insetfoot.C
+++ b/src/insets/insetfoot.C
@@ -21,6 +21,7 @@
#include "support/LOstream.h"
using std::ostream;
+using std::endl;
InsetFoot::InsetFoot(Buffer * bf)
: InsetCollapsable(bf)
diff --git a/src/insets/insettext.C b/src/insets/insettext.C
index b648a2407c..e0b8f1f5b3 100644
--- a/src/insets/insettext.C
+++ b/src/insets/insettext.C
@@ -792,7 +792,7 @@ InsetText::LocalDispatch(BufferView * bv,
// and current buffer's textclass (number). */
LyXTextClassList::ClassList::size_type tclass =
buffer->params.textclass;
- pair layout =
+ std::pair layout =
textclasslist.NumberOfLayout(tclass, arg);
// If the entry is obsolete, use the new one instead.
diff --git a/src/lastfiles.C b/src/lastfiles.C
index 775ec15500..b132255bc6 100644
--- a/src/lastfiles.C
+++ b/src/lastfiles.C
@@ -23,6 +23,7 @@
#include "debug.h"
using std::ifstream;
+using std::getline;
using std::ofstream;
using std::copy;
using std::ostream_iterator;
diff --git a/src/lyx_main.C b/src/lyx_main.C
index 37a7e05dc2..4f69d52ebe 100644
--- a/src/lyx_main.C
+++ b/src/lyx_main.C
@@ -248,7 +248,7 @@ void LyX::init(int */*argc*/, char **argv, bool gui)
lyxerr[Debug::INIT]
<< "Checking whether LyX is run in place... no"
<< endl;
- build_lyxdir.clear();
+ build_lyxdir.erase();
}
bool FollowLink;
diff --git a/src/lyxfunc.C b/src/lyxfunc.C
index c572813b64..f287f9b2ac 100644
--- a/src/lyxfunc.C
+++ b/src/lyxfunc.C
@@ -457,7 +457,7 @@ string LyXFunc::Dispatch(int ac,
// we have not done anything wrong yet.
errorstat = false;
- dispatch_buffer.clear();
+ dispatch_buffer.erase();
// if action is a pseudo-action, we need the real action
if (lyxaction.isPseudoAction(ac)) {
@@ -481,7 +481,7 @@ string LyXFunc::Dispatch(int ac,
if (getStatus(action) & Disabled)
goto exit_with_message;
- commandshortcut.clear();
+ commandshortcut.erase();
if (lyxrc.display_shortcuts && show_sc) {
if (action != LFUN_SELFINSERT) {
diff --git a/src/lyxserver.C b/src/lyxserver.C
index c271a8af80..d0ad5c7ce2 100644
--- a/src/lyxserver.C
+++ b/src/lyxserver.C
@@ -120,7 +120,7 @@ void LyXComm::openConnection() {
lyxerr << "LyXComm: Pipe " << tmp << " already exists.\n"
<< "If no other LyX program is active, please delete"
" the pipe by hand and try again." << endl;
- pipename.clear();
+ pipename.erase();
return;
}
#ifndef __EMX__
@@ -171,7 +171,7 @@ void LyXComm::openConnection() {
lyxerr << "LyXComm: Pipe " << tmp << " already exists.\n"
<< "If no other LyX program is active, please delete"
" the pipe by hand and try again." << endl;
- pipename.clear();
+ pipename.erase();
return;
}
#ifndef __EMX__
@@ -343,7 +343,7 @@ void LyXComm::callback(int fd, void *v)
{
lyxerr << "LyxComm: truncated command: "
<< lsbuf << endl;
- lsbuf.clear();
+ lsbuf.erase();
}
break; // reset connection
}
@@ -498,7 +498,7 @@ void LyXServer::callback(LyXServer * serv, string const & msg)
}
if (i < serv->numclients) {
serv->numclients--;
- serv->clients[i].clear();
+ serv->clients[i].erase();
lyxerr[Debug::LYXSERVER]
<< "LyXServer: Client "
<< client << " said goodbye"
diff --git a/src/mathed/formula.C b/src/mathed/formula.C
index 5737a6ab01..ebe0998860 100644
--- a/src/mathed/formula.C
+++ b/src/mathed/formula.C
@@ -588,7 +588,7 @@ void InsetFormula::display(bool dspf)
par->SetType(LM_OT_MIN);
par->SetStyle(LM_ST_TEXT);
if (!label.empty() && par->GetType() != LM_OT_MPARN) {
- label.clear();
+ label.erase();
}
}
disp_flag = dspf;
@@ -904,7 +904,7 @@ InsetFormula::LocalDispatch(BufferView * bv,
if (oldf) {
--type;
if (!label.empty()) {
- label.clear();
+ label.erase();
}
bv->owner()->getMiniBuffer()->Set(_("No number"));
} else {
@@ -1058,7 +1058,7 @@ InsetFormula::LocalDispatch(BufferView * bv,
}
UpdateLocal(bv);
} else
- label.clear();
+ label.erase();
break;
}
diff --git a/src/mathed/math_symbols.C b/src/mathed/math_symbols.C
index 76d709bbd2..0fe7451ce7 100644
--- a/src/mathed/math_symbols.C
+++ b/src/mathed/math_symbols.C
@@ -41,6 +41,7 @@
using std::max;
using std::endl;
+using std::ostream;
extern short greek_kb_flag;
diff --git a/src/minibuffer.C b/src/minibuffer.C
index cb53315daf..1b417b8130 100644
--- a/src/minibuffer.C
+++ b/src/minibuffer.C
@@ -140,7 +140,7 @@ extern "C" int C_MiniBuffer_peek_event(FL_OBJECT * ob, int event,
void MiniBuffer::ExecCommand()
{
- text.clear();
+ text.erase();
fl_set_input(the_buffer, "");
fl_set_focus_object(owner->getForm(), the_buffer);
}
@@ -253,7 +253,7 @@ void MiniBuffer::Reset()
{
if (!text_stored.empty()){
Set(text_stored);
- text_stored.clear();
+ text_stored.erase();
}
}
diff --git a/src/paragraph.C b/src/paragraph.C
index f7c4994512..e1833d2248 100644
--- a/src/paragraph.C
+++ b/src/paragraph.C
@@ -38,6 +38,8 @@ using std::ostream;
using std::endl;
using std::fstream;
using std::ios;
+using std::lower_bound;
+using std::upper_bound;
int tex_code_break_column = 72; // needs non-zero initialization. set later.
// this is a bad idea, but how can LyXParagraph find its buffer to get
@@ -479,14 +481,14 @@ void LyXParagraph::Clear()
noindent = false;
pextra_type = PEXTRA_NONE;
- pextra_width.clear();
- pextra_widthp.clear();
+ pextra_width.erase();
+ pextra_widthp.erase();
pextra_alignment = MINIPAGE_ALIGN_TOP;
pextra_hfill = false;
pextra_start_minipage = false;
- labelstring.clear();
- labelwidthstring.clear();
+ labelstring.erase();
+ labelwidthstring.erase();
layout = 0;
bibkey = 0;
@@ -1770,7 +1772,7 @@ void LyXParagraph::SetLayout(LyXTextClass::size_type new_layout)
* npar = 0;
par->layout = new_layout;
- par->labelwidthstring.clear();
+ par->labelwidthstring.erase();
par->align = LYX_ALIGN_LAYOUT;
par->added_space_top = VSpace(VSpace::NONE);
par->added_space_bottom = VSpace(VSpace::NONE);
@@ -2683,7 +2685,7 @@ bool LyXParagraph::linuxDocConvertChar(char c, string & sgml_string)
bool retval = false;
switch (c) {
case LyXParagraph::META_HFILL:
- sgml_string.clear();
+ sgml_string.erase();
break;
case LyXParagraph::META_NEWLINE:
sgml_string = '\n';
@@ -2732,7 +2734,7 @@ bool LyXParagraph::linuxDocConvertChar(char c, string & sgml_string)
sgml_string = ' ';
break;
case '\0': // Ignore :-)
- sgml_string.clear();
+ sgml_string.erase();
break;
default:
sgml_string = c;
@@ -4086,8 +4088,8 @@ void LyXParagraph::UnsetPExtraType()
return;
pextra_type = PEXTRA_NONE;
- pextra_width.clear();
- pextra_widthp.clear();
+ pextra_width.erase();
+ pextra_widthp.erase();
if (textclasslist.Style(current_view->buffer()->params.textclass,
layout).isEnvironment()) {
@@ -4111,8 +4113,8 @@ void LyXParagraph::UnsetPExtraType()
while (par && (par->layout == layout)
&& (par->depth == depth)) {
par->pextra_type = PEXTRA_NONE;
- par->pextra_width.clear();
- par->pextra_widthp.clear();
+ par->pextra_width.erase();
+ par->pextra_widthp.erase();
par = par->NextAfterFootnote();
if (par && (par->depth > depth))
par->UnsetPExtraType();
diff --git a/src/spellchecker.C b/src/spellchecker.C
index 623668c5f4..f7536cb749 100644
--- a/src/spellchecker.C
+++ b/src/spellchecker.C
@@ -51,7 +51,7 @@
#include "debug.h"
#include "support/lstrings.h"
-
+using std::reverse;
using std::endl;
// Spellchecker status
diff --git a/src/support/filetools.C b/src/support/filetools.C
index d478c4b74a..1b2af682fa 100644
--- a/src/support/filetools.C
+++ b/src/support/filetools.C
@@ -748,7 +748,7 @@ string ReplaceEnvironmentPath(string const & path)
if (!regexMatch(copy1, RegExp)) {
// No EndChar inside. So we are finished
result1 += CompareString + result0;
- result0.clear();
+ result0.erase();
continue;
}
diff --git a/src/support/lstrings.C b/src/support/lstrings.C
index efc8df4165..2d53a5ca5a 100644
--- a/src/support/lstrings.C
+++ b/src/support/lstrings.C
@@ -289,7 +289,7 @@ string strip(string const & a, char const c)
if (i != string::npos)
tmp.erase(i + 1, string::npos);
else
- tmp.clear(); // only c in the whole string
+ tmp.erase(); // only c in the whole string
return tmp;
}
@@ -326,7 +326,7 @@ string split(string const & a, string & piece, char delim)
piece = a.substr(0, i);
tmp = a.substr(i + 1);
} else if (i == 0) {
- piece.clear();
+ piece.erase();
tmp = a.substr(i + 1);
} else {
piece = a;
@@ -354,7 +354,7 @@ string rsplit(string const & a, string & piece, char delim)
piece = a.substr(0, i);
tmp = a.substr(i + 1);
} else { // delimter was not found
- piece.clear();
+ piece.erase();
}
return tmp;
}
diff --git a/src/table.C b/src/table.C
index 54812b0306..ceed03eddf 100644
--- a/src/table.C
+++ b/src/table.C
@@ -29,6 +29,7 @@
using std::ostream;
using std::istream;
+using std::getline;
using std::max;
using std::endl;
diff --git a/src/table.h b/src/table.h
index e83e3e2e6f..607ff908b4 100644
--- a/src/table.h
+++ b/src/table.h
@@ -284,6 +284,8 @@ private: //////////////////////////////////////////////////////////////////
///
cellstruct & operator=(cellstruct const &);
///
+ void setBuffer(Buffer * buf);
+ ///
int cellno;
///
int width_of_cell;
diff --git a/src/tabular.C b/src/tabular.C
index fc6620344d..16fb29af4e 100644
--- a/src/tabular.C
+++ b/src/tabular.C
@@ -28,6 +28,7 @@
using std::ostream;
using std::istream;
+using std::getline;
using std::max;
using std::endl;
@@ -963,7 +964,7 @@ static bool getTokenValue(string const str, const char * token, string & ret)
if ((pos < 0) || (ch != '='))
return false;
- ret.clear();
+ ret.erase();
pos += strlen(token)+1;
ch = str[pos];
if ((ch != '"') && (ch != '\'')) { // only read till next space
@@ -984,7 +985,7 @@ static bool getTokenValue(string const str, const char * token, int & num)
if ((pos < 0) || (ch != '='))
return false;
- ret.clear();
+ ret.erase();
pos += strlen(token)+1;
ch = str[pos];
if ((ch != '"') && (ch != '\'')) { // only read till next space
@@ -1008,7 +1009,7 @@ static bool getTokenValue(string const str, const char * token, bool & flag)
if ((pos < 0) || (ch != '='))
return false;
- ret.clear();
+ ret.erase();
pos += strlen(token)+1;
ch = str[pos];
if ((ch != '"') && (ch != '\'')) { // only read till next space
diff --git a/src/text.C b/src/text.C
index 5681718505..923b5f9039 100644
--- a/src/text.C
+++ b/src/text.C
@@ -571,7 +571,7 @@ int LyXText::LeftMargin(Row const * row) const
/* table stuff -- begin */
if (row->par->table)
- parindent.clear();
+ parindent.erase();
/* table stuff -- end */
int x = LYX_PAPER_MARGIN;
@@ -603,7 +603,7 @@ int LyXText::LeftMargin(Row const * row) const
textclasslist.Style(buffer->params.textclass,
newpar->GetLayout())
.nextnoindent)
- parindent.clear();
+ parindent.erase();
}
}
} else {
@@ -632,7 +632,7 @@ int LyXText::LeftMargin(Row const * row) const
if (newpar && !row->par->GetLayout()) {
if (newpar->FirstPhysicalPar()->noindent)
- parindent.clear();
+ parindent.erase();
else
parindent = textclasslist
.Style(buffer->params.textclass,
diff --git a/src/text2.C b/src/text2.C
index 4cee34067b..16ac40d0a5 100644
--- a/src/text2.C
+++ b/src/text2.C
@@ -1575,7 +1575,7 @@ void LyXText::SetCounter(LyXParagraph * par) const
}
if (!par->labelstring.empty()) {
- par->labelstring.clear();
+ par->labelstring.erase();
}
if (layout.margintype == MARGIN_MANUAL) {
@@ -1598,12 +1598,12 @@ void LyXText::SetCounter(LyXParagraph * par) const
if (!layout.labelstring().empty())
par->labelstring = layout.labelstring();
else
- par->labelstring.clear();
+ par->labelstring.erase();
} else {
if (!layout.labelstring_appendix().empty())
par->labelstring = layout.labelstring_appendix();
else
- par->labelstring.clear();
+ par->labelstring.erase();
}
#ifdef HAVE_SSTREAM
diff --git a/src/trans.C b/src/trans.C
index 122e7f3cf0..fd777ac4ae 100644
--- a/src/trans.C
+++ b/src/trans.C
@@ -371,7 +371,7 @@ int Trans::Load(string const & language)
if (res == 0) {
name_ = language;
} else
- name_.clear();
+ name_.erase();
return res;
}
diff --git a/src/trans_mgr.C b/src/trans_mgr.C
index 327f771feb..62b1922077 100644
--- a/src/trans_mgr.C
+++ b/src/trans_mgr.C
@@ -340,7 +340,7 @@ void TransManager::deadkey(char c, tex_accent accent, LyXText * t)
KmodInfo i;
i.accent = accent;
i.allowed = lyx_accent_table[accent].native;
- i.data.clear();
+ i.data.erase();
i.exception_list = 0;
string res = trans_fsm_.currentState->deadkey(c, i);
diff --git a/src/vc-backend.C b/src/vc-backend.C
index 46fc8b1e2a..6e8a8b751e 100644
--- a/src/vc-backend.C
+++ b/src/vc-backend.C
@@ -18,6 +18,7 @@
using std::endl;
using std::ifstream;
+using std::getline;
int VCS::doVCCommand(string const & cmd, string const & path)
{