1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-03 17:59:33 +02:00

code cleanup

This commit is contained in:
Nikolay Pultsin 2012-10-26 10:07:05 +04:00
parent 7f30c5fa73
commit e790aeb68a

View file

@ -83,8 +83,7 @@ bool OleStreamReader::readDocument(shared_ptr<ZLInputStream> inputStream) {
}
OleEntry wordDocumentEntry;
bool result = storage->getEntryByName(WORD_DOCUMENT, wordDocumentEntry);
if (!result) {
if (!storage->getEntryByName(WORD_DOCUMENT, wordDocumentEntry)) {
return false;
}
@ -95,8 +94,7 @@ bool OleStreamReader::readDocument(shared_ptr<ZLInputStream> inputStream) {
bool OleStreamReader::readStream(OleMainStream &oleMainStream) {
clear();
bool res = oleMainStream.open();
if (!res) {
if (!oleMainStream.open()) {
ZLLogger::Instance().println("OleStreamReader", "doesn't open correct");
return false;
}
@ -169,10 +167,8 @@ bool OleStreamReader::readStream(OleMainStream &oleMainStream) {
}
bool OleStreamReader::getUcs2Char(OleMainStream &stream, ZLUnicodeUtil::Ucs2Char &ucs2char) {
if (myCurBufferPosition >= myBuffer.size()) {
if (!fillBuffer(stream)) {
return false;
}
if (myCurBufferPosition >= myBuffer.size() && !fillBuffer(stream)) {
return false;
}
ucs2char = myBuffer.at(myCurBufferPosition++);
processStyles(stream);