Commit 10a27acf authored by Chen Bill's avatar Chen Bill Committed by GitHub

remove warning C4244 from bufferio.h (#2536)

parent 3e79417e
#ifndef BUFFERIO_H
#define BUFFERIO_H
#ifdef _MSC_VER
#pragma warning(disable: 4244)
#endif
class BufferIO {
public:
......@@ -43,7 +40,7 @@ public:
inline static int CopyWStr(T1* src, T2* pstr, int bufsize) {
int l = 0;
while(src[l] && l < bufsize - 1) {
pstr[l] = src[l];
pstr[l] = (T2)src[l];
l++;
}
pstr[l] = 0;
......@@ -53,7 +50,7 @@ public:
inline static int CopyWStrRef(T1* src, T2*& pstr, int bufsize) {
int l = 0;
while(src[l] && l < bufsize - 1) {
pstr[l] = src[l];
pstr[l] = (T2)src[l];
l++;
}
pstr += l;
......@@ -65,7 +62,7 @@ public:
char* pstr = str;
while(*wsrc != 0) {
if(*wsrc < 0x80) {
*str = *wsrc;
*str = (char)*wsrc;
++str;
} else if(*wsrc < 0x800) {
str[0] = ((*wsrc >> 6) & 0x1f) | 0xc0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment