Lessen indentation by returning early if there's nothing to do.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35821 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-10-25 12:14:10 +00:00
parent b942b87e7d
commit 1edd77ca30

View File

@ -3605,8 +3605,10 @@ Buffer::ReadStatus Buffer::readFromVC(FileName const & fn)
Buffer::ReadStatus Buffer::readEmergency(FileName const & fn)
{
FileName const emergencyFile(fn.absFileName() + ".emergency");
if (emergencyFile.exists()
&& emergencyFile.lastModified() > fn.lastModified()) {
if (!emergencyFile.exists()
|| emergencyFile.lastModified() <= fn.lastModified())
return ReadFileNotFound;
docstring const file = makeDisplayPath(fn.absFileName(), 20);
docstring const text =
bformat(_("An emergency save of the document "
@ -3648,8 +3650,8 @@ Buffer::ReadStatus Buffer::readEmergency(FileName const & fn)
default:
return ReadCancel;
}
}
return ReadFileNotFound;
// suppress warning
return ReadCancel;
}