mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-16 00:05:45 -04:00
Add pending upstream fix to remove warning
This commit is contained in:
parent
52b9c02ccf
commit
50de3d71e7
11
external/libdxfrw/intern/drw_textcodec.cpp
vendored
11
external/libdxfrw/intern/drw_textcodec.cpp
vendored
@ -57,8 +57,7 @@ void DRW_TextCodec::setCodePage(std::string *c, bool dxfFormat){
|
|||||||
if (cp == "ANSI_874")
|
if (cp == "ANSI_874")
|
||||||
conv.reset( new DRW_ConvTable(DRW_Table874, CPLENGTHCOMMON) );
|
conv.reset( new DRW_ConvTable(DRW_Table874, CPLENGTHCOMMON) );
|
||||||
else if (cp == "ANSI_932")
|
else if (cp == "ANSI_932")
|
||||||
conv.reset( new DRW_Conv932Table(DRW_Table932, DRW_LeadTable932,
|
conv.reset( new DRW_Conv932Table() );
|
||||||
DRW_DoubleTable932, CPLENGTH932) );
|
|
||||||
else if (cp == "ANSI_936")
|
else if (cp == "ANSI_936")
|
||||||
conv.reset( new DRW_ConvDBCSTable(DRW_Table936, DRW_LeadTable936,
|
conv.reset( new DRW_ConvDBCSTable(DRW_Table936, DRW_LeadTable936,
|
||||||
DRW_DoubleTable936, CPLENGTH936) );
|
DRW_DoubleTable936, CPLENGTH936) );
|
||||||
@ -345,6 +344,10 @@ std::string DRW_ConvDBCSTable::toUtf8(std::string *s) {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DRW_Conv932Table::DRW_Conv932Table()
|
||||||
|
:DRW_Converter(DRW_Table932, CPLENGTH932)
|
||||||
|
{}
|
||||||
|
|
||||||
std::string DRW_Conv932Table::fromUtf8(std::string *s) {
|
std::string DRW_Conv932Table::fromUtf8(std::string *s) {
|
||||||
std::string result;
|
std::string result;
|
||||||
bool notFound;
|
bool notFound;
|
||||||
@ -369,8 +372,8 @@ std::string DRW_Conv932Table::fromUtf8(std::string *s) {
|
|||||||
if (notFound && ( code<0xF8 || (code>0x390 && code<0x542) ||
|
if (notFound && ( code<0xF8 || (code>0x390 && code<0x542) ||
|
||||||
(code>0x200F && code<0x9FA1) || code>0xF928 )) {
|
(code>0x200F && code<0x9FA1) || code>0xF928 )) {
|
||||||
for (int k=0; k<cpLength; k++){
|
for (int k=0; k<cpLength; k++){
|
||||||
if(doubleTable[k][1] == code) {
|
if(DRW_DoubleTable932[k][1] == code) {
|
||||||
int data = doubleTable[k][0];
|
int data = DRW_DoubleTable932[k][0];
|
||||||
char d[3];
|
char d[3];
|
||||||
d[0] = data >> 8;
|
d[0] = data >> 8;
|
||||||
d[1] = data & 0xFF;
|
d[1] = data & 0xFF;
|
||||||
|
10
external/libdxfrw/intern/drw_textcodec.h
vendored
10
external/libdxfrw/intern/drw_textcodec.h
vendored
@ -79,17 +79,9 @@ private:
|
|||||||
|
|
||||||
class DRW_Conv932Table : public DRW_Converter {
|
class DRW_Conv932Table : public DRW_Converter {
|
||||||
public:
|
public:
|
||||||
DRW_Conv932Table(const int *t, const int *lt, const int dt[][2], int l)
|
DRW_Conv932Table();
|
||||||
:DRW_Converter(t, l)
|
|
||||||
,leadTable{lt}
|
|
||||||
,doubleTable{dt}
|
|
||||||
{}
|
|
||||||
|
|
||||||
virtual std::string fromUtf8(std::string *s);
|
virtual std::string fromUtf8(std::string *s);
|
||||||
virtual std::string toUtf8(std::string *s);
|
virtual std::string toUtf8(std::string *s);
|
||||||
private:
|
|
||||||
const int *leadTable;
|
|
||||||
const int (*doubleTable)[2];
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user