fix: docker中编译的bug

This commit is contained in:
msojocs 2023-09-23 12:04:56 +08:00
parent c770d0a758
commit 2db605d015
4 changed files with 11 additions and 5 deletions

View File

@ -75,7 +75,7 @@ namespace WXML
private:
/* data */
public:
bool offset_0;
bool offset_0 = false;
std::string offset_4;
Token(/* args */);
~Token();

View File

@ -32,7 +32,10 @@ namespace WXML {
{
if (!this->offset_0.count(s))
{
this->offset_0[s] = this->offset_0.size();
// Note: 不能合成一行否则数量会错误比实际值大1
int size = this->offset_0.size();
this->offset_0[s] = size;
// this->offset_0[s] = this->offset_0.size(); // 会导致size的值比实际大1
this->offset_24.push_back(s);
}
}
@ -42,6 +45,7 @@ namespace WXML {
int result = -1;
if(this->offset_0.count(s))
{
// printf("GetStrID: %s, size: %d\n", s.data(), this->offset_0[s]);
return this->offset_0[s];
}
return result;

View File

@ -1498,7 +1498,9 @@ namespace WXML {
std::string attr = this->offset_48[v13].ToAttrContent();
if(!this->offset_248->offset_0.count(attr))
{
this->offset_248->offset_0[attr] = this->offset_248->offset_0.size();
// Note: 不能合成一行,否则数量会错误
int size = this->offset_248->offset_0.size();
this->offset_248->offset_0[attr] = size;
this->offset_248->offset_24.push_back(attr);
}
}

View File

@ -23,7 +23,7 @@ namespace WXML
Table num;
/**
* TODO:
*
*/
int accept(int *a1, uint8_t a2[266], int &a3, char const *a4)
{
@ -41,7 +41,7 @@ namespace WXML
a4++;
}
if (((char *)a2)[v7])
if (a2[v7])
{
a3 = i;
return 0;