diff --git a/jni/NativeFormats/fbreader/src/bookmodel/BookModel.cpp b/jni/NativeFormats/fbreader/src/bookmodel/BookModel.cpp index f82d883b3..238966901 100644 --- a/jni/NativeFormats/fbreader/src/bookmodel/BookModel.cpp +++ b/jni/NativeFormats/fbreader/src/bookmodel/BookModel.cpp @@ -48,7 +48,7 @@ BookModel::~BookModel() { void BookModel::setHyperlinkMatcher(shared_ptr matcher) { myHyperlinkMatcher = matcher; } - + BookModel::Label BookModel::label(const std::string &id) const { if (!myHyperlinkMatcher.isNull()) { return myHyperlinkMatcher->match(myInternalHyperlinks, id); diff --git a/jni/NativeFormats/fbreader/src/formats/css/StyleSheetParser.cpp b/jni/NativeFormats/fbreader/src/formats/css/StyleSheetParser.cpp index 244004ae0..a2a59bcd5 100644 --- a/jni/NativeFormats/fbreader/src/formats/css/StyleSheetParser.cpp +++ b/jni/NativeFormats/fbreader/src/formats/css/StyleSheetParser.cpp @@ -297,7 +297,7 @@ void StyleSheetMultiStyleParser::processAtRule(const std::string &name, const St for (std::vector::const_iterator jt = ids.begin(); jt != ids.end(); ++jt) { if (ZLStringUtil::stringStartsWith(*jt, "url(") && ZLStringUtil::stringEndsWith(*jt, ")")) { - path = ZLFile(url2FullPath(*jt)).path(); + path = ZLFile(url2FullPath(*jt)).path(); break; } } @@ -349,7 +349,7 @@ void StyleSheetParserWithCache::importCSS(const std::string &path) { StyleSheetParserWithCache importParser(fileToImport, myPathPrefix, myFontMap, myEncryptionMap); importParser.myProcessedFiles.insert(myProcessedFiles.begin(), myProcessedFiles.end()); importParser.parseStream(stream); - myEntries.insert(myEntries.end(), importParser.myEntries.begin(), importParser.myEntries.end()); + myEntries.insert(myEntries.end(), importParser.myEntries.begin(), importParser.myEntries.end()); } myProcessedFiles.insert(fileToImport.path()); } diff --git a/jni/NativeFormats/fbreader/src/formats/css/StyleSheetTable.cpp b/jni/NativeFormats/fbreader/src/formats/css/StyleSheetTable.cpp index 6079a16bc..ccd00e5a6 100644 --- a/jni/NativeFormats/fbreader/src/formats/css/StyleSheetTable.cpp +++ b/jni/NativeFormats/fbreader/src/formats/css/StyleSheetTable.cpp @@ -199,7 +199,7 @@ shared_ptr StyleSheetTable::createControl(const AttributeMap & const std::string &fontSize = value(styles, "font-size"); if (!fontSize.empty()) { - bool doSetFontSize = true; + bool doSetFontSize = true; short size = 100; ZLTextStyleEntry::SizeUnit unit = ZLTextStyleEntry::SIZE_UNIT_PERCENT; if (fontSize == "xx-small") { diff --git a/jni/NativeFormats/fbreader/src/formats/html/HtmlReader.cpp b/jni/NativeFormats/fbreader/src/formats/html/HtmlReader.cpp index 4ac415bc8..d8ad80caa 100644 --- a/jni/NativeFormats/fbreader/src/formats/html/HtmlReader.cpp +++ b/jni/NativeFormats/fbreader/src/formats/html/HtmlReader.cpp @@ -123,7 +123,7 @@ void HtmlReader::readDocument(ZLInputStream &stream) { int quotationCounter = 0; HtmlTag currentTag; char endOfComment[2] = "\0"; - + const std::size_t BUFSIZE = 2048; char *buffer = new char[BUFSIZE]; std::size_t length; @@ -362,7 +362,7 @@ void HtmlReader::readDocument(ZLInputStream &stream) { break; } } - offset += length; + offset += length; } while (length == BUFSIZE); endOfProcessing: delete[] buffer; diff --git a/jni/NativeFormats/fbreader/src/formats/oeb/OEBBookReader.cpp b/jni/NativeFormats/fbreader/src/formats/oeb/OEBBookReader.cpp index 7d34209a7..84aa33d96 100644 --- a/jni/NativeFormats/fbreader/src/formats/oeb/OEBBookReader.cpp +++ b/jni/NativeFormats/fbreader/src/formats/oeb/OEBBookReader.cpp @@ -134,7 +134,7 @@ void OEBBookReader::startElementHandler(const char *tag, const char **xmlattribu } bool OEBBookReader::coverIsSingleImage() const { - return + return COVER_IMAGE == myCoverFileType || (COVER == myCoverFileType && ZLStringUtil::stringStartsWith(myCoverMimeType, "image/")); diff --git a/jni/NativeFormats/fbreader/src/formats/rtf/RtfReader.h b/jni/NativeFormats/fbreader/src/formats/rtf/RtfReader.h index 8e0cb0724..00a9a86e6 100644 --- a/jni/NativeFormats/fbreader/src/formats/rtf/RtfReader.h +++ b/jni/NativeFormats/fbreader/src/formats/rtf/RtfReader.h @@ -67,7 +67,7 @@ protected: FONT_ITALIC, FONT_UNDERLINED }; - + virtual void addCharData(const char *data, std::size_t len, bool convert) = 0; virtual void insertImage(const std::string &mimeType, const std::string &fileName, std::size_t startOffset, std::size_t size) = 0; virtual void setEncoding(int code) = 0; @@ -91,7 +91,7 @@ protected: bool Underlined; ZLTextAlignmentType Alignment; DestinationType Destination; - + bool ReadDataAsHex; }; @@ -109,7 +109,7 @@ private: int myBinaryDataSize; std::string myNextImageMimeType; - int myIsInterrupted; + int myIsInterrupted; friend class RtfNewParagraphCommand; friend class RtfFontPropertyCommand; diff --git a/jni/NativeFormats/fbreader/src/formats/txt/PlainTextFormat.cpp b/jni/NativeFormats/fbreader/src/formats/txt/PlainTextFormat.cpp index 9b392f217..adc141e3b 100644 --- a/jni/NativeFormats/fbreader/src/formats/txt/PlainTextFormat.cpp +++ b/jni/NativeFormats/fbreader/src/formats/txt/PlainTextFormat.cpp @@ -97,7 +97,7 @@ void PlainTextFormatDetector::detect(ZLInputStream &stream, PlainTextFormat &for unsigned int currentLineLength = 0; unsigned int currentLineIndent = 0; int currentNumberOfEmptyLines = -1; - + char *buffer = new char[BUFFER_SIZE]; int length; char previous = 0; @@ -127,7 +127,7 @@ void PlainTextFormatDetector::detect(ZLInputStream &stream, PlainTextFormat &for if (!currentLineIsEmpty) { stringIndentTable[std::min(currentLineIndent, tableSize - 1)]++; } - + currentLineIsEmpty = true; currentLineLength = 0; currentLineIndent = 0; @@ -182,8 +182,8 @@ void PlainTextFormatDetector::detect(ZLInputStream &stream, PlainTextFormat &for } if (emptyLinesBeforeNewSection > 0) { for (index = tableSize - 1; index > 0; --index) { - emptyLinesTable[index - 1] += emptyLinesTable[index]; - emptyLinesBeforeShortStringTable[index - 1] += emptyLinesBeforeShortStringTable[index]; + emptyLinesTable[index - 1] += emptyLinesTable[index]; + emptyLinesBeforeShortStringTable[index - 1] += emptyLinesBeforeShortStringTable[index]; } for (index = emptyLinesBeforeNewSection; index < tableSize; ++index) { if ((emptyLinesBeforeShortStringTable[index] > 2) && diff --git a/jni/NativeFormats/fbreader/src/formats/util/EntityFilesCollector.cpp b/jni/NativeFormats/fbreader/src/formats/util/EntityFilesCollector.cpp index 5c13e44ce..a85c61b12 100644 --- a/jni/NativeFormats/fbreader/src/formats/util/EntityFilesCollector.cpp +++ b/jni/NativeFormats/fbreader/src/formats/util/EntityFilesCollector.cpp @@ -24,5 +24,5 @@ const std::vector &EntityFilesCollector::xhtmlDTDs() { if (DTDs.empty()) { DTDs.push_back("formats/xhtml/xhtml-merged.ent"); } - return DTDs; + return DTDs; } diff --git a/jni/NativeFormats/fbreader/src/formats/xhtml/XHTMLReader.h b/jni/NativeFormats/fbreader/src/formats/xhtml/XHTMLReader.h index 1f2aeb2c9..130f90408 100644 --- a/jni/NativeFormats/fbreader/src/formats/xhtml/XHTMLReader.h +++ b/jni/NativeFormats/fbreader/src/formats/xhtml/XHTMLReader.h @@ -50,14 +50,14 @@ class XHTMLTagAction { public: virtual ~XHTMLTagAction(); - + virtual void doAtStart(XHTMLReader &reader, const char **xmlattributes) = 0; virtual void doAtEnd(XHTMLReader &reader) = 0; virtual bool isEnabled(XHTMLReadingState state) = 0; protected: - static BookReader &bookReader(XHTMLReader &reader); - static const std::string &pathPrefix(XHTMLReader &reader); + static BookReader &bookReader(XHTMLReader &reader); + static const std::string &pathPrefix(XHTMLReader &reader); static void beginParagraph(XHTMLReader &reader); static void endParagraph(XHTMLReader &reader); }; diff --git a/jni/NativeFormats/fbreader/src/library/Book.cpp b/jni/NativeFormats/fbreader/src/library/Book.cpp index e19667b78..d047412e4 100644 --- a/jni/NativeFormats/fbreader/src/library/Book.cpp +++ b/jni/NativeFormats/fbreader/src/library/Book.cpp @@ -66,7 +66,7 @@ shared_ptr Book::loadFromFile(const ZLFile &file) { shared_ptr book = new Book(file, 0); if (!plugin->readMetainfo(*book)) { - return 0; + return 0; } if (book->title().empty()) { diff --git a/jni/NativeFormats/fbreader/src/library/Tag.cpp b/jni/NativeFormats/fbreader/src/library/Tag.cpp index f49bd04d4..fcfd3017f 100644 --- a/jni/NativeFormats/fbreader/src/library/Tag.cpp +++ b/jni/NativeFormats/fbreader/src/library/Tag.cpp @@ -80,7 +80,7 @@ shared_ptr Tag::cloneSubTag(shared_ptr tag, shared_ptr oldparent, } if (levels.empty()) { - return 0; + return 0; } shared_ptr res = newparent; diff --git a/jni/NativeFormats/fbreader/src/library/Tag.h b/jni/NativeFormats/fbreader/src/library/Tag.h index 4512bc97b..48ffe7fbb 100644 --- a/jni/NativeFormats/fbreader/src/library/Tag.h +++ b/jni/NativeFormats/fbreader/src/library/Tag.h @@ -43,7 +43,7 @@ public: static void setTagId(shared_ptr, int tagId); static shared_ptr cloneSubTag(shared_ptr tag, shared_ptr oldparent, shared_ptr newparent); - + static void collectAncestors(shared_ptr tag, TagList &parents); static void collectTagNames(std::vector &tags); @@ -70,7 +70,7 @@ public: int tagId() const; std::size_t level() const; - + private: const std::string myName; mutable std::string myFullName; @@ -78,7 +78,7 @@ private: shared_ptr myParent; TagList myChildren; const std::size_t myLevel; - + int myTagId; mutable jobject myJavaTag; diff --git a/jni/NativeFormats/zlibrary/core/src/filesystem/ZLDir.h b/jni/NativeFormats/zlibrary/core/src/filesystem/ZLDir.h index 61fc5895d..69f51aeb0 100644 --- a/jni/NativeFormats/zlibrary/core/src/filesystem/ZLDir.h +++ b/jni/NativeFormats/zlibrary/core/src/filesystem/ZLDir.h @@ -46,7 +46,7 @@ public: protected: virtual std::string delimiter() const = 0; - + private: std::string myPath; diff --git a/jni/NativeFormats/zlibrary/core/src/filesystem/ZLFSDir.h b/jni/NativeFormats/zlibrary/core/src/filesystem/ZLFSDir.h index 17d78a4b1..5f3471138 100644 --- a/jni/NativeFormats/zlibrary/core/src/filesystem/ZLFSDir.h +++ b/jni/NativeFormats/zlibrary/core/src/filesystem/ZLFSDir.h @@ -23,7 +23,7 @@ #include "ZLDir.h" class ZLFSDir : public ZLDir { - + protected: ZLFSDir(const std::string &path); diff --git a/jni/NativeFormats/zlibrary/core/src/filesystem/ZLFSManager.h b/jni/NativeFormats/zlibrary/core/src/filesystem/ZLFSManager.h index ec2393cb7..e44d81143 100644 --- a/jni/NativeFormats/zlibrary/core/src/filesystem/ZLFSManager.h +++ b/jni/NativeFormats/zlibrary/core/src/filesystem/ZLFSManager.h @@ -39,11 +39,11 @@ public: protected: static ZLFSManager *ourInstance; - + protected: ZLFSManager(); virtual ~ZLFSManager(); - + public: void normalize(std::string &path) const; virtual std::string resolveSymlink(const std::string &path) const = 0; diff --git a/jni/NativeFormats/zlibrary/core/src/language/ZLCharSequence.cpp b/jni/NativeFormats/zlibrary/core/src/language/ZLCharSequence.cpp index f972dbb8e..f35b11c96 100644 --- a/jni/NativeFormats/zlibrary/core/src/language/ZLCharSequence.cpp +++ b/jni/NativeFormats/zlibrary/core/src/language/ZLCharSequence.cpp @@ -29,7 +29,7 @@ ZLCharSequence::ZLCharSequence(const char *ptr, std::size_t size) : mySize(size) myHead = new char[mySize]; for (std::size_t count = 0; count < mySize; ++count){ myHead[count] = ptr[count]; - } + } } ZLCharSequence::ZLCharSequence(const ZLCharSequence& other) : mySize(other.mySize) { @@ -48,11 +48,11 @@ ZLCharSequence::ZLCharSequence(const std::string &hexSequence) { myHead = new char[mySize]; for (std::size_t count = 0; count < mySize; ++count){ char a = hexSequence[count * 5 + 2]; - char b = hexSequence[count * 5 + 3]; - a -= (a >= 97) ? 87 : 48; + char b = hexSequence[count * 5 + 3]; + a -= (a >= 97) ? 87 : 48; b -= (b >= 97) ? 87 : 48; myHead[count] = a*16 + b; - } + } } ZLCharSequence& ZLCharSequence::operator= (const ZLCharSequence& other) { @@ -72,20 +72,20 @@ ZLCharSequence& ZLCharSequence::operator= (const ZLCharSequence& other) { } } return *this; -} +} -std::string ZLCharSequence::toHexSequence() const { +std::string ZLCharSequence::toHexSequence() const { std::string result; static const char table[] = "0123456789abcdef"; for (std::size_t count = 0;; ++count) { result += "0x"; result += table[(myHead[count] >> 4) & 0x0F]; result += table[myHead[count] & 0x0F]; - if (count == mySize-1) { + if (count == mySize-1) { return result; } result += " "; - } + } return result; } diff --git a/jni/NativeFormats/zlibrary/core/src/language/ZLCharSequence.h b/jni/NativeFormats/zlibrary/core/src/language/ZLCharSequence.h index c03e29f55..6a19852a7 100644 --- a/jni/NativeFormats/zlibrary/core/src/language/ZLCharSequence.h +++ b/jni/NativeFormats/zlibrary/core/src/language/ZLCharSequence.h @@ -25,17 +25,17 @@ class ZLCharSequence { public: - ZLCharSequence(); - ZLCharSequence(const char *ptr, std::size_t size); + ZLCharSequence(); + ZLCharSequence(const char *ptr, std::size_t size); ZLCharSequence(const std::string &hexSequence); ZLCharSequence(const ZLCharSequence &other); - ~ZLCharSequence(); - + ~ZLCharSequence(); + std::size_t getSize() const; const char &operator [] (std::size_t index) const; ZLCharSequence &operator = (const ZLCharSequence& other); - - std::string toHexSequence() const; + + std::string toHexSequence() const; // returns // an integer < 0 if the sequence is less than other @@ -43,7 +43,7 @@ public: // 0 if the sequence is equal to other int compareTo(const ZLCharSequence &other) const; -private: +private: std::size_t mySize; char *myHead; }; diff --git a/jni/NativeFormats/zlibrary/core/src/language/ZLStatistics.cpp b/jni/NativeFormats/zlibrary/core/src/language/ZLStatistics.cpp index d65e04d5d..3c16b5cc4 100644 --- a/jni/NativeFormats/zlibrary/core/src/language/ZLStatistics.cpp +++ b/jni/NativeFormats/zlibrary/core/src/language/ZLStatistics.cpp @@ -80,15 +80,15 @@ int ZLStatistics::correlation(const ZLStatistics& candidate, const ZLStatistics& const unsigned long long patternSum = pattern.getVolume(); const unsigned long long candidateSum2 = candidate.getSquaresVolume(); const unsigned long long patternSum2 = pattern.getSquaresVolume(); - + shared_ptr ptrA = candidate.begin(); shared_ptr ptrB = pattern.begin(); const shared_ptr endA = candidate.end(); const shared_ptr endB = pattern.end(); - + std::size_t count = 0; long long correlationSum = 0; - while ((*ptrA != *endA) && (*ptrB != *endB)) { + while ((*ptrA != *endA) && (*ptrB != *endB)) { ++count; const int comparison = ptrA->sequence().compareTo(ptrB->sequence()); if (comparison < 0) { @@ -141,10 +141,10 @@ int ZLStatistics::correlation(const ZLStatistics& candidate, const ZLStatistics& } int candidateMult = 1000000 / patternMult; - const long long quotient1 = (patternMult * numerator / patternDispersion); + const long long quotient1 = (patternMult * numerator / patternDispersion); const long long quotient2 = (candidateMult * numerator / candidateDispersion); const int sign = (numerator >= 0) ? 1 : -1; - + return sign * quotient1 * quotient2; } @@ -155,7 +155,7 @@ ZLMapBasedStatistics::ZLMapBasedStatistics() : ZLStatistics() { ZLMapBasedStatistics::ZLMapBasedStatistics(const Dictionary &dictionary) { if (!dictionary.empty()) { myCharSequenceSize = dictionary.begin()->first.getSize(); - myVolumesAreUpToDate = false; + myVolumesAreUpToDate = false; myDictionary = dictionary; } else { myCharSequenceSize = 0; @@ -191,7 +191,7 @@ ZLMapBasedStatistics ZLMapBasedStatistics::top(std::size_t amount) const { tempVector.resize(myDictionary.size()); std::copy(myDictionary.begin(), myDictionary.end(), tempVector.begin()); std::sort(tempVector.rbegin(), tempVector.rend(), LessFrequency()); - Vector::const_iterator it = tempVector.begin(); + Vector::const_iterator it = tempVector.begin(); while (amount != 0) { dictionary[it->first] = it->second; ++it; @@ -213,7 +213,7 @@ void ZLMapBasedStatistics::retain(const ZLMapBasedStatistics &other) { const Dictionary::iterator endA = myDictionary.end(); const Dictionary::const_iterator endB = other.myDictionary.end(); - while ((itA != endA) && (itB != endB)) { + while ((itA != endA) && (itB != endB)) { const int comparison = itA->first.compareTo(itB->first); if (comparison < 0) { myDictionary.erase(itA++); @@ -230,7 +230,7 @@ void ZLMapBasedStatistics::retain(const ZLMapBasedStatistics &other) { if (itA != endA) { myDictionary.erase(itA, endA); } - myVolumesAreUpToDate = true; + myVolumesAreUpToDate = true; } else { *this = ZLMapBasedStatistics(); } @@ -241,7 +241,7 @@ void ZLMapBasedStatistics::scaleToShort() { const std::size_t maxShort = 65535; if (maxFrequency > maxShort) { const std::size_t devider = maxFrequency / maxShort + 1; - Dictionary::iterator it = myDictionary.begin(); + Dictionary::iterator it = myDictionary.begin(); const Dictionary::iterator end = myDictionary.end(); while (it != end) { if (it->second < devider) { @@ -272,7 +272,7 @@ ZLArrayBasedStatistics::ZLArrayBasedStatistics(std::size_t charSequenceSize, std mySequences = new char[myCharSequenceSize * size]; myFrequencies = new unsigned short[size]; } - + ZLArrayBasedStatistics::~ZLArrayBasedStatistics() { if (mySequences != 0) { delete[] mySequences; @@ -285,7 +285,7 @@ void ZLArrayBasedStatistics::insert(const ZLCharSequence &charSequence, std::siz return; } for (std::size_t i = 0; i < myCharSequenceSize; ++i) { - mySequences[myBack * myCharSequenceSize + i] = charSequence[i]; + mySequences[myBack * myCharSequenceSize + i] = charSequence[i]; } myFrequencies[myBack] = (unsigned short) frequency; ++myBack; @@ -334,6 +334,6 @@ ZLArrayBasedStatistics& ZLArrayBasedStatistics::operator= (const ZLArrayBasedSta } else { mySequences = 0; myFrequencies = 0; - } + } return *this; } diff --git a/jni/NativeFormats/zlibrary/core/src/language/ZLStatistics.h b/jni/NativeFormats/zlibrary/core/src/language/ZLStatistics.h index b40176488..78c0a5d46 100644 --- a/jni/NativeFormats/zlibrary/core/src/language/ZLStatistics.h +++ b/jni/NativeFormats/zlibrary/core/src/language/ZLStatistics.h @@ -39,7 +39,7 @@ public: std::size_t getVolume() const; unsigned long long getSquaresVolume() const; std::size_t getCharSequenceSize() const; - + public: virtual shared_ptr begin() const = 0; virtual shared_ptr end() const = 0; @@ -60,27 +60,27 @@ protected: class ZLMapBasedStatistics : public ZLStatistics { private: - typedef std::vector > Vector; + typedef std::vector > Vector; typedef std::map Dictionary; public: ZLMapBasedStatistics(); ZLMapBasedStatistics(const Dictionary &dictionary); - ~ZLMapBasedStatistics(); - + ~ZLMapBasedStatistics(); + std::size_t getSize() const; - + ZLMapBasedStatistics top(std::size_t amount) const; - + void scaleToShort(); - void retain(const ZLMapBasedStatistics &other); + void retain(const ZLMapBasedStatistics &other); bool empty() const; virtual shared_ptr begin() const; virtual shared_ptr end() const; -protected: +protected: void calculateVolumes() const; private: @@ -97,12 +97,12 @@ private: class ZLArrayBasedStatistics : public ZLStatistics { public: ZLArrayBasedStatistics(); - ZLArrayBasedStatistics(std::size_t charSequenceSize, std::size_t size, std::size_t volume, unsigned long long squaresVolume); + ZLArrayBasedStatistics(std::size_t charSequenceSize, std::size_t size, std::size_t volume, unsigned long long squaresVolume); ~ZLArrayBasedStatistics(); ZLArrayBasedStatistics &operator = (const ZLArrayBasedStatistics &other); void insert(const ZLCharSequence &charSequence, std::size_t frequency); - + bool empty() const; virtual shared_ptr begin() const; @@ -113,7 +113,7 @@ protected: private: std::size_t myCapacity; - std::size_t myBack; + std::size_t myBack; char* mySequences; unsigned short* myFrequencies; }; diff --git a/jni/NativeFormats/zlibrary/core/src/language/ZLStatisticsItem.cpp b/jni/NativeFormats/zlibrary/core/src/language/ZLStatisticsItem.cpp index 0dd387359..5030203f3 100644 --- a/jni/NativeFormats/zlibrary/core/src/language/ZLStatisticsItem.cpp +++ b/jni/NativeFormats/zlibrary/core/src/language/ZLStatisticsItem.cpp @@ -19,7 +19,7 @@ #include "ZLStatisticsItem.h" -ZLMapBasedStatisticsItem::ZLMapBasedStatisticsItem(const std::map::const_iterator it, std::size_t index) : ZLStatisticsItem(index), +ZLMapBasedStatisticsItem::ZLMapBasedStatisticsItem(const std::map::const_iterator it, std::size_t index) : ZLStatisticsItem(index), myIterator(it) { } diff --git a/jni/NativeFormats/zlibrary/core/src/language/ZLStatisticsXMLReader.cpp b/jni/NativeFormats/zlibrary/core/src/language/ZLStatisticsXMLReader.cpp index f96186f30..94c293916 100644 --- a/jni/NativeFormats/zlibrary/core/src/language/ZLStatisticsXMLReader.cpp +++ b/jni/NativeFormats/zlibrary/core/src/language/ZLStatisticsXMLReader.cpp @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include #include "ZLCharSequence.h" #include "ZLStatistics.h" @@ -64,5 +64,5 @@ shared_ptr ZLStatisticsXMLReader::readStatistics(const s statisticsMap.insert(std::make_pair(fileName, myStatisticsPtr)); - return myStatisticsPtr; + return myStatisticsPtr; } diff --git a/jni/NativeFormats/zlibrary/core/src/language/ZLStatisticsXMLReader.h b/jni/NativeFormats/zlibrary/core/src/language/ZLStatisticsXMLReader.h index 6ee62068e..13f8c6a0a 100644 --- a/jni/NativeFormats/zlibrary/core/src/language/ZLStatisticsXMLReader.h +++ b/jni/NativeFormats/zlibrary/core/src/language/ZLStatisticsXMLReader.h @@ -36,7 +36,7 @@ public: private: shared_ptr myStatisticsPtr; - + private: static const std::string ITEM_TAG; static const std::string STATISTICS_TAG; diff --git a/jni/NativeFormats/zlibrary/core/src/unix/library/ZLUnixLibrary.cpp b/jni/NativeFormats/zlibrary/core/src/unix/library/ZLUnixLibrary.cpp index 12e177f5c..3f1ecf327 100644 --- a/jni/NativeFormats/zlibrary/core/src/unix/library/ZLUnixLibrary.cpp +++ b/jni/NativeFormats/zlibrary/core/src/unix/library/ZLUnixLibrary.cpp @@ -35,7 +35,7 @@ const std::string ZLibrary::PathDelimiter(":"); const std::string ZLibrary::EndOfLine("\n"); /*void ZLibrary::initLocale() { - const char *locale = setlocale(LC_MESSAGES, ""); + const char *locale = setlocale(LC_MESSAGES, ""); if (locale != 0) { std::string sLocale = locale; const int dotIndex = sLocale.find('.'); diff --git a/jni/NativeFormats/zlibrary/core/src/util/ZLUnicodeUtil.cpp b/jni/NativeFormats/zlibrary/core/src/util/ZLUnicodeUtil.cpp index b130d8f34..976bd616e 100644 --- a/jni/NativeFormats/zlibrary/core/src/util/ZLUnicodeUtil.cpp +++ b/jni/NativeFormats/zlibrary/core/src/util/ZLUnicodeUtil.cpp @@ -436,23 +436,23 @@ ZLUnicodeUtil::Breakable ZLUnicodeUtil::isBreakable(Ucs4Char c) { } if (((c >= 0x201A) && (c <= 0x201C)) || - ((c >= 0x201E) && (c <= 0x201F))) { - return BREAKABLE_BEFORE; + ((c >= 0x201E) && (c <= 0x201F))) { + return BREAKABLE_BEFORE; + } + switch (c) { + case 0x2018: case 0x2039: case 0x2045: + case 0x207D: case 0x208D: case 0x2329: + case 0x3008: case 0x300A: case 0x300C: + case 0x300E: case 0x3010: case 0x3014: + case 0x3016: case 0x3018: case 0x301A: + case 0x301D: case 0xFD3E: case 0xFE35: + case 0xFE37: case 0xFE39: case 0xFE3B: + case 0xFE3D: case 0xFE3F: case 0xFE41: + case 0xFE43: case 0xFE59: case 0xFE5B: + case 0xFE5D: case 0xFF08: case 0xFF3B: + case 0xFF5B: case 0xFF62: + return BREAKABLE_BEFORE; } - switch (c) { - case 0x2018: case 0x2039: case 0x2045: - case 0x207D: case 0x208D: case 0x2329: - case 0x3008: case 0x300A: case 0x300C: - case 0x300E: case 0x3010: case 0x3014: - case 0x3016: case 0x3018: case 0x301A: - case 0x301D: case 0xFD3E: case 0xFE35: - case 0xFE37: case 0xFE39: case 0xFE3B: - case 0xFE3D: case 0xFE3F: case 0xFE41: - case 0xFE43: case 0xFE59: case 0xFE5B: - case 0xFE5D: case 0xFF08: case 0xFF3B: - case 0xFF5B: case 0xFF62: - return BREAKABLE_BEFORE; - } return BREAKABLE_AFTER; } diff --git a/jni/NativeFormats/zlibrary/core/src/util/ZLUnicodeUtil.h b/jni/NativeFormats/zlibrary/core/src/util/ZLUnicodeUtil.h index 12f8d4f00..b1b7cc490 100644 --- a/jni/NativeFormats/zlibrary/core/src/util/ZLUnicodeUtil.h +++ b/jni/NativeFormats/zlibrary/core/src/util/ZLUnicodeUtil.h @@ -40,7 +40,7 @@ public: BREAKABLE_BEFORE, BREAKABLE_AFTER }; - + static bool isUtf8String(const char *str, int len); static bool isUtf8String(const std::string &str); static void cleanUtf8String(std::string &str); diff --git a/jni/NativeFormats/zlibrary/core/src/xml/ZLAsynchronousInputStream.h b/jni/NativeFormats/zlibrary/core/src/xml/ZLAsynchronousInputStream.h index 68a4e1604..66ba78d43 100644 --- a/jni/NativeFormats/zlibrary/core/src/xml/ZLAsynchronousInputStream.h +++ b/jni/NativeFormats/zlibrary/core/src/xml/ZLAsynchronousInputStream.h @@ -58,7 +58,7 @@ private: bool myInitialized; bool myEof; -private: +private: // disable copying ZLAsynchronousInputStream(const ZLAsynchronousInputStream &); const ZLAsynchronousInputStream &operator = (const ZLAsynchronousInputStream &); diff --git a/jni/NativeFormats/zlibrary/core/src/xml/ZLPlainAsynchronousInputStream.h b/jni/NativeFormats/zlibrary/core/src/xml/ZLPlainAsynchronousInputStream.h index cc357980b..1f8aeb1ff 100644 --- a/jni/NativeFormats/zlibrary/core/src/xml/ZLPlainAsynchronousInputStream.h +++ b/jni/NativeFormats/zlibrary/core/src/xml/ZLPlainAsynchronousInputStream.h @@ -31,7 +31,7 @@ public: private: bool processInputInternal(Handler &handler); -private: +private: // disable copying ZLPlainAsynchronousInputStream(const ZLPlainAsynchronousInputStream &); const ZLPlainAsynchronousInputStream &operator = (const ZLPlainAsynchronousInputStream &); diff --git a/jni/NativeFormats/zlibrary/text/src/model/ZLTextModel.cpp b/jni/NativeFormats/zlibrary/text/src/model/ZLTextModel.cpp index fd11fc8ea..9d7616a46 100644 --- a/jni/NativeFormats/zlibrary/text/src/model/ZLTextModel.cpp +++ b/jni/NativeFormats/zlibrary/text/src/model/ZLTextModel.cpp @@ -363,7 +363,7 @@ void ZLTextModel::addVideoEntry(const ZLVideoEntry &entry) { std::size_t len = 4; for (std::map::const_iterator it = sources.begin(); it != sources.end(); ++it) { - len += 2 * (ZLUnicodeUtil::utf8Length(it->first) + ZLUnicodeUtil::utf8Length(it->second)) + 4; + len += 2 * (ZLUnicodeUtil::utf8Length(it->first) + ZLUnicodeUtil::utf8Length(it->second)) + 4; } myLastEntryStart = myAllocator->allocate(len);