Review feedback, part 1

This commit is contained in:
Svyatoslav Scherbina
2016-11-22 16:06:51 +07:00
parent a58d682d40
commit 950bc62c7b
2 changed files with 4 additions and 7 deletions
@@ -182,9 +182,7 @@ private class NativeIndexImpl : NativeIndex() {
CXType_ULongLong -> UInt64Type CXType_ULongLong -> UInt64Type
CXType_LongLong -> Int64Type CXType_LongLong -> Int64Type
CXType_Typedef -> { CXType_Typedef -> getTypedef(type)
getTypedef(type)
}
CXType_Record -> RecordType(getStructTypeDecl(type)) CXType_Record -> RecordType(getStructTypeDecl(type))
CXType_Enum -> EnumType(getEnumTypeDef(type)) CXType_Enum -> EnumType(getEnumTypeDef(type))
@@ -84,8 +84,7 @@ class CPointer<T : CPointed> private constructor(val rawValue: NativePtr) {
} }
override fun toString(): String { override fun toString(): String {
val hex = "%x".format(rawValue) return "CPointer(raw=0x%x)".format(rawValue)
return "CPointer(raw=0x$hex)"
} }
} }
@@ -107,7 +106,7 @@ inline val <reified T : CPointed> CPointer<T>.pointed: T
val CPointer<*>?.rawValue: NativePtr val CPointer<*>?.rawValue: NativePtr
get() = this?.rawValue ?: nativeNullPtr get() = this?.rawValue ?: nativeNullPtr
fun <T : CPointed> CPointer<*>.reinterpret() = this as CPointer<T> fun <T : CPointed> CPointer<*>.reinterpret(): CPointer<T> = CPointer.create(this.rawValue)
/** /**
* The [CPointed] without any specified interpretation. * The [CPointed] without any specified interpretation.
@@ -155,7 +154,7 @@ interface CVariable : CPointed {
} }
/** /**
* The C data which is composed from number of members. * The C data which is composed from several members.
*/ */
interface CAggregate : CPointed interface CAggregate : CPointed