最近在学习谷歌的开源浏览器 Cef 框架,
//std::string old_overflow;
if (max_write < str_size) {
overflow_ += std::string(str + max_write, str_size - max_write);
}
然后我改成了这样
//std::string old_overflow;
if (max_write < str_size) {
std::string test = std::string(str + max_write, str_size - max_write);
overflow_ += test;
}
结果在打开网页时,往来的代码没有问题,我改的就要反复刷新好几次才会出现网页,我也就是把一行代码拆开写了,为啥会这样?
1
phpfpm 2019 年 8 月 30 日
你没分配空间?
|
2
ysc3839 2019 年 8 月 30 日 via Android
这段代码在哪里的?
|
6
xuyaomin 2019 年 8 月 30 日
这个改动不会造成你说的那种影响
|
7
maichael 2019 年 8 月 30 日
你把这个改动改回去,然后再随便改另外一个地方,再测试一遍看看效果。
|