mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-15 08:48:52 +00:00
fixed mutating inline values (#5942)
Co-authored-by: Kamil Rojewski <kamil.rojewski@gmail.com>
This commit is contained in:
@@ -167,13 +167,7 @@ Rapunzel.prototype.hairLength = function() {
|
||||
* @returns {boolean}
|
||||
*/
|
||||
Rapunzel.prototype.mutate_hair_length = function(value) {
|
||||
var offset = this.bb.__offset(this.bb_pos, 0);
|
||||
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.bb.writeInt32(this.bb_pos + offset, value);
|
||||
this.bb.writeInt32(this.bb_pos + 0, value);
|
||||
return true;
|
||||
};
|
||||
|
||||
@@ -226,13 +220,7 @@ BookReader.prototype.booksRead = function() {
|
||||
* @returns {boolean}
|
||||
*/
|
||||
BookReader.prototype.mutate_books_read = function(value) {
|
||||
var offset = this.bb.__offset(this.bb_pos, 0);
|
||||
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.bb.writeInt32(this.bb_pos + offset, value);
|
||||
this.bb.writeInt32(this.bb_pos + 0, value);
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
@@ -202,13 +202,7 @@ hairLength():number {
|
||||
* @returns boolean
|
||||
*/
|
||||
mutate_hair_length(value:number):boolean {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 0);
|
||||
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.bb!.writeInt32(this.bb_pos + offset, value);
|
||||
this.bb!.writeInt32(this.bb_pos + 0, value);
|
||||
return true;
|
||||
};
|
||||
|
||||
@@ -290,13 +284,7 @@ booksRead():number {
|
||||
* @returns boolean
|
||||
*/
|
||||
mutate_books_read(value:number):boolean {
|
||||
var offset = this.bb!.__offset(this.bb_pos, 0);
|
||||
|
||||
if (offset === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.bb!.writeInt32(this.bb_pos + offset, value);
|
||||
this.bb!.writeInt32(this.bb_pos + 0, value);
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user