mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
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:
parent
9bf713b476
commit
b34683e78a
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user