fix int.tosignedvar
This commit is contained in:
parent
cea22e65a2
commit
4b07f97168
@ -4,7 +4,7 @@ kotlin.code.style=official
|
|||||||
specifyKotlinAsDependency=false
|
specifyKotlinAsDependency=false
|
||||||
|
|
||||||
projectGroup=ru.dbotthepony.kommons
|
projectGroup=ru.dbotthepony.kommons
|
||||||
projectVersion=2.1.6
|
projectVersion=2.1.7
|
||||||
|
|
||||||
guavaDepVersion=33.0.0
|
guavaDepVersion=33.0.0
|
||||||
gsonDepVersion=2.8.9
|
gsonDepVersion=2.8.9
|
||||||
|
@ -109,7 +109,7 @@ private fun Int.toSignedVar(): Int {
|
|||||||
if (this >= 0)
|
if (this >= 0)
|
||||||
return this shl 1
|
return this shl 1
|
||||||
else
|
else
|
||||||
return (this shl 1) or 1
|
return ((-this - 1) shl 1) or 1
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun Long.toSignedVar(): Long {
|
private fun Long.toSignedVar(): Long {
|
||||||
|
Loading…
Reference in New Issue
Block a user