1
0
Fork 0

remove ineffective optimization

This commit is contained in:
Kevin Matz 2023-04-27 09:05:09 -04:00
parent bc36227387
commit 5455d805d5
1 changed files with 0 additions and 6 deletions

View File

@ -111,12 +111,6 @@ struct Message
template<typename T>
static void writeType(std::vector<uint8_t> &data, const T val)
{
if (val == 0)
{
for (int i = sizeof(T); --i >= 0; )
data.push_back(0);
return;
}
auto raw = reinterpret_cast<const uint8_t*>(&val);
for (int i = sizeof(T); --i >= 0; )
data.push_back(raw[i]);