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:
Niels Martin Hansen 2011-01-08 21:58:48 +00:00
parent abf9ee645b
commit a13e0ddedf
2 changed files with 4 additions and 4 deletions

View file

@ -39,7 +39,7 @@ UCDetect::UCDetect(const std::string &file): nsUniversalDetector(NS_FILTER_ALL)
while (!mDone && !fp->eof()) {
char buf[512];
fp->read(buf, 512);
size_t bytes = fp->gcount();
size_t bytes = (size_t)fp->gcount();
HandleData(buf, bytes);
}
}
@ -47,7 +47,7 @@ UCDetect::UCDetect(const std::string &file): nsUniversalDetector(NS_FILTER_ALL)
DataEnd();
if (mDetectedCharset) {
list.insert(CLDPair(1, mDetectedCharset));
list.insert(CLDPair(1.f, mDetectedCharset));
} else {
switch (mInputState) {
@ -64,7 +64,7 @@ UCDetect::UCDetect(const std::string &file): nsUniversalDetector(NS_FILTER_ALL)
break;
}
case ePureAscii:
list.insert(CLDPair(1, "US-ASCII"));
list.insert(CLDPair(1.f, "US-ASCII"));
break;
default:

View file

@ -148,7 +148,7 @@ Message::Message(const char *section,
Message::~Message() {
sm->message = msg.str();
sm->len = msg.pcount();
sm->len = (size_t)msg.pcount();
agi::log::log->log(sm);
}