c_str fixes

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8986 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2004-09-16 20:37:34 +00:00
parent bcec816212
commit 0ea0f3399a
7 changed files with 35 additions and 15 deletions

View File

@ -1,3 +1,7 @@
2004-09-16 Lars Gullik Bjonnes <larsbj@gullik.net>
* Spacing.C (set): c_str fix
2004-09-09 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* lyx_cb.C (Reconfigure): quote the name of configure script in

View File

@ -56,7 +56,7 @@ void Spacing::set(Spacing::Space sp, float val)
void Spacing::set(Spacing::Space sp, string const & val)
{
float fval = 0.0;
istringstream istr(val.c_str());
istringstream istr(val);
istr >> fval;
set(sp, fval);
}

View File

@ -1,3 +1,19 @@
2004-09-16 Lars Gullik Bjonnes <larsbj@gullik.net>
* math_parser.C (tokenize): c_str fix
(mathed_parse_cell): c_str fix
(mathed_parse_normal): c_str fix
* math_nestinset.C (priv_dispatch): c_str fix
(priv_dispatch): c_str fix
* math_hullinset.C (doExtern): c_str fix
* math_extern.C (extractNumber): c_str fix
(pipeThroughMaxima): c_str fix
(pipeThroughMaple): c_str fix
(pipeThroughOctave): c_str fix
2004-09-15 Lars Gullik Bjonnes <larsbj@gullik.net>
* math_binominset.h (MATH_BINOMINSET_H): fix include guard.

View File

@ -200,7 +200,7 @@ bool extractString(MathAtom const & at, string & str)
// convert this inset somehow to a number
bool extractNumber(MathArray const & ar, int & i)
{
istringstream is(charSequence(ar.begin(), ar.end()).c_str());
istringstream is(charSequence(ar.begin(), ar.end()));
is >> i;
return is;
}
@ -208,7 +208,7 @@ bool extractNumber(MathArray const & ar, int & i)
bool extractNumber(MathArray const & ar, double & d)
{
istringstream is(charSequence(ar.begin(), ar.end()).c_str());
istringstream is(charSequence(ar.begin(), ar.end()));
is >> d;
return is;
}
@ -963,7 +963,7 @@ namespace {
break;
// search line with "Incorrect syntax"
istringstream is(out.c_str());
istringstream is(out);
string line;
while (is) {
getline(is, line);
@ -1080,7 +1080,7 @@ namespace {
string out = captureOutput("mint -i 1 -S -s -q -q", expr + ';');
if (out.empty())
break; // expression syntax is ok
istringstream is(out.c_str());
istringstream is(out);
string line;
getline(is, line);
if (line.find("on line") != 0)
@ -1134,7 +1134,7 @@ namespace {
break;
// search line with single caret
istringstream is(out.c_str());
istringstream is(out);
string line;
while (is) {
getline(is, line);

View File

@ -875,7 +875,7 @@ void MathHullInset::doExtern(LCursor & cur, FuncRequest & func)
{
string lang;
string extra;
istringstream iss(func.argument.c_str());
istringstream iss(func.argument);
iss >> lang >> extra;
if (extra.empty())
extra = "noextra";
@ -1337,7 +1337,7 @@ int MathHullInset::docbook(Buffer const & buf, ostream & os,
else
name = "informalequation";
string bname = name;
string bname = name;
if (! label(0).empty()) bname += " id=\"" + label(0)+ "\"";
ms << MTag(bname.c_str());
@ -1350,7 +1350,7 @@ int MathHullInset::docbook(Buffer const & buf, ostream & os,
res = latex(buf, ms.os(), runparams);
ms << ETag("alt");
}
ms << ETag(name.c_str());
return ms.line() + res;
}

View File

@ -392,7 +392,7 @@ void MathNestInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
cur.message(_("Paste"));
replaceSelection(cur);
size_t n = 0;
istringstream is(cmd.argument.c_str());
istringstream is(cmd.argument);
is >> n;
pasteSelection(cur, n);
cur.clearSelection(); // bug 393
@ -612,7 +612,7 @@ void MathNestInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
lyxerr << "LFUN_SETXY broken!" << endl;
int x = 0;
int y = 0;
istringstream is(cmd.argument.c_str());
istringstream is(cmd.argument);
is >> x >> y;
cur.setScreenPos(x, y);
break;

View File

@ -389,7 +389,7 @@ void Parser::tokenize(istream & is)
void Parser::tokenize(string const & buffer)
{
istringstream is(buffer.c_str(), ios::in | ios::binary);
istringstream is(buffer, ios::in | ios::binary);
char c;
while (is.get(c)) {
@ -1216,7 +1216,7 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
void mathed_parse_cell(MathArray & ar, string const & str)
{
istringstream is(str.c_str());
istringstream is(str);
mathed_parse_cell(ar, is);
}
@ -1229,7 +1229,7 @@ void mathed_parse_cell(MathArray & ar, istream & is)
bool mathed_parse_normal(MathAtom & t, string const & str)
{
istringstream is(str.c_str());
istringstream is(str);
return Parser(is).parse(t);
}
@ -1248,7 +1248,7 @@ bool mathed_parse_normal(MathAtom & t, LyXLex & lex)
void mathed_parse_normal(MathGridInset & grid, string const & str)
{
istringstream is(str.c_str());
istringstream is(str);
Parser(is).parse1(grid, 0, MathInset::MATH_MODE, false);
}