Same behavior, but makes it explicit to the reader that these are const.
Prevents cases where the reader might assume that just because the
variable isn't const qualified that it must be mutable, when it actually
isn't.
A few implementations of Render() contain const-casts nested within its
their call hierarchy to get around the fact that this function is marked
const. We can just make the member function non-const to allow removal
of these casts in follow up changes.
This member function alters instance state in a few implementations, so
it shouldn't be made const.
The state manager parameter also shouldn't be const. Retrieved data
from the post constructed instance is further modified in some
implementations. This removes the constness on this parameter in order
to fix more const_cast usages in a follow-up change.
We can use append() instead of data(). This allows the size of the
string view instance to be used directly instead of redundantly doing a
string size lookup.
In some implementations, returning via default construction for
std::optional can cause the entire inner buffer to be zeroed out.
Returning with std::nullopt causes only the internal validity flag to be
set and nothing more.
Includes all necessary headers and uses a forward declaration where
applicable. Ensures inclusion changes in other headers don't break the compilation
of these headers and source files.
Makes use of the C++14 make_unique allocation function to allocate class
instances where applicable instead of a reset with a new operator within
it.
This doesn't touch cases where buffers are allocated, given make_unique
would zero-initialize them.