mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-19 22:25:42 +00:00
Only generate @kotlin.ExperimentalUnsigned annotation on create*Vector methods having an unsigned array type parameter. (#7881)
Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
@@ -17,7 +17,6 @@ import java.nio.ByteOrder
|
||||
import kotlin.math.sign
|
||||
|
||||
@Suppress("unused")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
class Attacker : Table() {
|
||||
|
||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||
|
||||
@@ -17,7 +17,6 @@ import java.nio.ByteOrder
|
||||
import kotlin.math.sign
|
||||
|
||||
@Suppress("unused")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
class BookReader : Struct() {
|
||||
|
||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
@Suppress("unused")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
class Character_ private constructor() {
|
||||
companion object {
|
||||
const val NONE: UByte = 0u
|
||||
|
||||
@@ -17,7 +17,6 @@ import java.nio.ByteOrder
|
||||
import kotlin.math.sign
|
||||
|
||||
@Suppress("unused")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
class FallingTub : Struct() {
|
||||
|
||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// automatically generated by the FlatBuffers compiler, do not modify
|
||||
|
||||
@Suppress("unused")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
class Gadget private constructor() {
|
||||
companion object {
|
||||
const val NONE: UByte = 0u
|
||||
|
||||
@@ -17,7 +17,6 @@ import java.nio.ByteOrder
|
||||
import kotlin.math.sign
|
||||
|
||||
@Suppress("unused")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
class HandFan : Table() {
|
||||
|
||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||
|
||||
@@ -17,7 +17,6 @@ import java.nio.ByteOrder
|
||||
import kotlin.math.sign
|
||||
|
||||
@Suppress("unused")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
class Movie : Table() {
|
||||
|
||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||
@@ -99,6 +98,7 @@ class Movie : Table() {
|
||||
fun addMainCharacterType(builder: FlatBufferBuilder, mainCharacterType: UByte) = builder.addByte(0, mainCharacterType.toByte(), 0)
|
||||
fun addMainCharacter(builder: FlatBufferBuilder, mainCharacter: Int) = builder.addOffset(1, mainCharacter, 0)
|
||||
fun addCharactersType(builder: FlatBufferBuilder, charactersType: Int) = builder.addOffset(2, charactersType, 0)
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
fun createCharactersTypeVector(builder: FlatBufferBuilder, data: UByteArray) : Int {
|
||||
builder.startVector(1, data.size, 1)
|
||||
for (i in data.size - 1 downTo 0) {
|
||||
|
||||
@@ -17,7 +17,6 @@ import java.nio.ByteOrder
|
||||
import kotlin.math.sign
|
||||
|
||||
@Suppress("unused")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
class Rapunzel : Struct() {
|
||||
|
||||
fun __init(_i: Int, _bb: ByteBuffer) {
|
||||
|
||||
Reference in New Issue
Block a user