mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-02 14:58:18 +00:00
Merge pull request #3889 from PSPDFKit-labs/james/avoid-msvc-align-error
MSVC doesn't allow alignment on function params.
This commit is contained in:
@@ -333,7 +333,7 @@ public:
|
|||||||
|
|
||||||
// Change elements if you have a non-const pointer to this object.
|
// Change elements if you have a non-const pointer to this object.
|
||||||
// Scalars only. See reflection.h, and the documentation.
|
// Scalars only. See reflection.h, and the documentation.
|
||||||
void Mutate(uoffset_t i, T val) {
|
void Mutate(uoffset_t i, const T& val) {
|
||||||
assert(i < size());
|
assert(i < size());
|
||||||
WriteScalar(data() + i, val);
|
WriteScalar(data() + i, val);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user