Buffer::Data() returns char*. You can assign that to a const char* variable without casting.