Use emptyArray in orEmpty.

This commit is contained in:
Ilya Gorbunov
2016-12-24 02:03:48 +03:00
parent 05dcaccf09
commit 9619e08c9b
2 changed files with 2 additions and 2 deletions
@@ -24,7 +24,7 @@ import java.nio.charset.Charset
/** Returns the array if it's not `null`, or an empty array otherwise. */
public inline fun <reified T> Array<out T>?.orEmpty(): Array<out T> = this ?: arrayOf<T>()
public inline fun <reified T> Array<out T>?.orEmpty(): Array<out T> = this ?: emptyArray<T>()
/**
* Converts the contents of this byte array to a string using the specified [charset].