Closed AdamMajer closed 10 years ago
Agreed. The committed fix was a stopgap for the reported issue on Windows, however all of this code is the next step for cleanups in my optimization branches. In fact, in one of those branches I just grab all these values up front rather than passing them on to the various frame types (which each create their own QDataStream and read the values in there, in Frame::Base). It's still going to be a little bit before I get to those chances while I put together the benchmarking code itself, so if you have suggestions in the meantime they are more than welcome.
@MaplerStory can you verify this fixes your issues for the interim?
merged with 7ff0dfab1bcda8904a52c5682fe2ed4c52c5292e
@mbroadst , yeah, i test the commit on windows. it works well
Buffer should not be used blindly when reading Frame::HEADER_SIZE. It's error prone and adds nothing over reading to stack - and it's only 7 bytes. There are places in this class where buffer.clear() is called.
An issue that will need to be fixed is the breaking of strict-aliasing rules. That cast is clearly for unaligned int which will break on some platforms.