From: Jean-Marc Lasgouttes Date: Tue, 5 Jun 2018 09:24:05 +0000 (+0200) Subject: Use getArg to read math-extern arguments X-Git-Tag: lyx-2.4.0dev-acb2ca7b~3377 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=2d02c39d565901d91f3cc400d9642ff6e9a134d8;p=features.git Use getArg to read math-extern arguments This avoids a use of istringstream that coverity dislikes. --- diff --git a/src/mathed/InsetMathHull.cpp b/src/mathed/InsetMathHull.cpp index ff7595f33c..61d078abe0 100644 --- a/src/mathed/InsetMathHull.cpp +++ b/src/mathed/InsetMathHull.cpp @@ -1722,13 +1722,11 @@ void InsetMathHull::check() const void InsetMathHull::doExtern(Cursor & cur, FuncRequest & func) { - docstring dlang; - docstring extra; - idocstringstream iss(func.argument()); - iss >> dlang >> extra; + //FIXME: sort out whether we want std::string or docstring for those + string const lang = func.getArg(0); + docstring extra = from_utf8(func.getArg(1)); if (extra.empty()) extra = from_ascii("noextra"); - string const lang = to_ascii(dlang); // replace selection with result of computation if (reduceSelectionToOneCell(cur)) {