Skip to content

Commit

Permalink
ZLCharSequence bug has been fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
vasiliy-bout committed Oct 31, 2010
1 parent ef15974 commit 4fd5595
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions zlibrary/core/src/language/ZLCharSequence.h
Expand Up @@ -35,7 +35,7 @@ class ZLCharSequence {
const char &operator [] (size_t index) const;
ZLCharSequence &operator = (const ZLCharSequence& other);

std::string toString() const;
//std::string toString() const;
std::string toHexSequence() const;

// returns
Expand Down Expand Up @@ -81,8 +81,8 @@ inline size_t ZLCharSequence::getSize() const {
return mySize;
}

inline std::string ZLCharSequence::toString() const {
return std::string(myHead, 0, mySize);
}
//inline std::string ZLCharSequence::toString() const {
// return std::string(myHead, 0, mySize);
//}

#endif /*__ZLCHARSEQUENCE_H__*/
2 changes: 1 addition & 1 deletion zlibrary/core/src/language/ZLStatistics.cpp
Expand Up @@ -282,7 +282,7 @@ void ZLArrayBasedStatistics::insert(const ZLCharSequence &charSequence, size_t f
return;
}
for(size_t i = 0; i < myCharSequenceSize; ++i) {
mySequences[myBack * myCharSequenceSize + i] = charSequence.toString()[i];
mySequences[myBack * myCharSequenceSize + i] = charSequence[i];
}
myFrequencies[myBack] = (unsigned short) frequency;
++myBack;
Expand Down

0 comments on commit 4fd5595

Please sign in to comment.