Don't test for string::c_str() returning NULL.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3767 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-03-18 16:01:33 +00:00
parent 9bf713b476
commit b34683e78a
2 changed files with 10 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2002-03-18 Angus Leeming <a.leeming@ic.ac.uk>
* biblio.C (getInfo): string::c_str() never returns NULL. Don't test
for it.
2002-03-11 Herbert Voss <voss@lyx.org>
* biblio.C (parseBibTeX): fix another minibug with an

View File

@ -294,14 +294,12 @@ string const getInfo(InfoMap const & map, string const & key)
if (!year.empty())
result << ", " << year;
char const * const tmp = result.str().c_str();
string result_str = tmp ? strip(tmp) : string();
string const result_str = strip(result.str().c_str());
if (!result_str.empty())
return result_str;
if (result_str.empty())
// This should never happen (or at least be very unusual!)
result_str = it->second;
return result_str;
// This should never happen (or at least be very unusual!)
return it->second;
}