Question:
Hello.
I am using C++11 standart. Application based to std::vector<unsigned char=""> (unsigned char == BYTE in Windows).
Question: How fast convert std::vector<unsigned char=""> to CkByteData?
My convertion code (slow speed):
std::vector<unsigned char> inputBuffer = { 0x01, 0x02, 0x03 };
CkByteData buffer;
for (int i = 0; i < (int)inputBuffer.size(); i++)
buffer.appendChar(inputBuffer[i]);
Another way:
buffer.append2(&inputBuffer[0], (unsigned long)inputBuffer.size());