Clear out some warnings emitted by Visual C++ 2010.
On 32 bit VC 2010, std::streamsize is 64 bit while size_t is 32 bit. Originally committed to SVN as r5151.
This commit is contained in:
parent
abf9ee645b
commit
a13e0ddedf
|
@ -39,7 +39,7 @@ UCDetect::UCDetect(const std::string &file): nsUniversalDetector(NS_FILTER_ALL)
|
||||||
while (!mDone && !fp->eof()) {
|
while (!mDone && !fp->eof()) {
|
||||||
char buf[512];
|
char buf[512];
|
||||||
fp->read(buf, 512);
|
fp->read(buf, 512);
|
||||||
size_t bytes = fp->gcount();
|
size_t bytes = (size_t)fp->gcount();
|
||||||
HandleData(buf, bytes);
|
HandleData(buf, bytes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ UCDetect::UCDetect(const std::string &file): nsUniversalDetector(NS_FILTER_ALL)
|
||||||
DataEnd();
|
DataEnd();
|
||||||
|
|
||||||
if (mDetectedCharset) {
|
if (mDetectedCharset) {
|
||||||
list.insert(CLDPair(1, mDetectedCharset));
|
list.insert(CLDPair(1.f, mDetectedCharset));
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
switch (mInputState) {
|
switch (mInputState) {
|
||||||
|
@ -64,7 +64,7 @@ UCDetect::UCDetect(const std::string &file): nsUniversalDetector(NS_FILTER_ALL)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ePureAscii:
|
case ePureAscii:
|
||||||
list.insert(CLDPair(1, "US-ASCII"));
|
list.insert(CLDPair(1.f, "US-ASCII"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -148,7 +148,7 @@ Message::Message(const char *section,
|
||||||
|
|
||||||
Message::~Message() {
|
Message::~Message() {
|
||||||
sm->message = msg.str();
|
sm->message = msg.str();
|
||||||
sm->len = msg.pcount();
|
sm->len = (size_t)msg.pcount();
|
||||||
agi::log::log->log(sm);
|
agi::log::log->log(sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue