Skip to content

Convert all binary buffers to std::vector<char>, and convert all text buffers to std::string #5

@ASmoliak

Description

@ASmoliak

There are many uses of char* for both binary and text buffers, in C++ it is very convenient to use std::vector<char> for any binary buffers, and for any text buffers std::string, you can specify the size of the buffer and initialize it with 0's with something like so:

std::vector<char> buffer(kDesiredSize, {});
try to apply these changes to your project, and see the improvements.
You also have the ability to resize those buffers and modify them at will quite easily.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions