Skip to content

Commit

Permalink
fixed casting
Browse files Browse the repository at this point in the history
  • Loading branch information
Joungkyun committed Feb 10, 2014
1 parent 349d259 commit 74d670b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/JpCntx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void JapaneseContextAnalysis::HandleData(const char* aBuf, PRUint32 aLen)
mDone = PR_TRUE;
break;
}
mRelSample[jp2CharContext[mLastCharOrder][order]]++;
mRelSample[(int)jp2CharContext[mLastCharOrder][order]]++;
}
mLastCharOrder = order;
}
Expand Down
2 changes: 1 addition & 1 deletion src/JpCntx.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class JapaneseContextAnalysis
{
mTotalRel++;
//count this sequence to its category counter
mRelSample[jp2CharContext[mLastCharOrder][order]]++;
mRelSample[(int)jp2CharContext[mLastCharOrder][order]]++;
}
mLastCharOrder = order;
};
Expand Down
4 changes: 2 additions & 2 deletions src/chardet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ typedef struct Detect_t {
#include <chardet.h>

CHARDET_API char * detect_version (void) {
return LIBCHARDET_VERSION;
return (char *) LIBCHARDET_VERSION;
}

CHARDET_API char * detect_uversion (void) {
return LIBCHARDET_UVERSION;
return (char *) LIBCHARDET_UVERSION;
}

CHARDET_API DetectObj * detect_obj_init (void) {
Expand Down
4 changes: 2 additions & 2 deletions src/nsSBCharSetProber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ nsProbingState nsSingleByteCharSetProber::HandleData(const char* aBuf, PRUint32
{
mTotalSeqs++;
if (!mReversed)
++(mSeqCounters[mModel->precedenceMatrix[mLastOrder*SAMPLE_SIZE+order]]);
++(mSeqCounters[(int)mModel->precedenceMatrix[mLastOrder*SAMPLE_SIZE+order]]);
else // reverse the order of the letters in the lookup
++(mSeqCounters[mModel->precedenceMatrix[order*SAMPLE_SIZE+mLastOrder]]);
++(mSeqCounters[(int)mModel->precedenceMatrix[order*SAMPLE_SIZE+mLastOrder]]);
}
}
mLastOrder = order;
Expand Down

0 comments on commit 74d670b

Please sign in to comment.