@@ -757,19 +757,19 @@ open class Collection(
757
757
*/
758
758
@KotlinCleanup(" Check CollectionTask<Int?, Int> - should be fine" )
759
759
@KotlinCleanup(" change to ArrayList!" )
760
- fun genCards (nids : kotlin.collections.Collection <Long ?> ? , model : Model ): ArrayList <Long >? {
760
+ fun genCards (nids : kotlin.collections.Collection <Long > , model : Model ): ArrayList <Long >? {
761
761
return genCards<CollectionTask <Int ?, Int >>(Utils .collection2Array(nids), model)
762
762
}
763
763
764
764
fun <T > genCards (
765
- nids : kotlin.collections.Collection <Long ?> ? ,
765
+ nids : kotlin.collections.Collection <Long > ,
766
766
model : Model ,
767
767
task : T ?
768
768
): ArrayList <Long >? where T : ProgressSender <Int ?>? , T : CancelListener? {
769
769
return genCards(Utils .collection2Array(nids), model, task)
770
770
}
771
771
772
- fun genCards (nids : kotlin.collections.Collection <Long ?> ? , mid : NoteTypeId ): ArrayList <Long >? {
772
+ fun genCards (nids : kotlin.collections.Collection <Long > , mid : NoteTypeId ): ArrayList <Long >? {
773
773
return genCards(nids, models.get(mid)!! )
774
774
}
775
775
@@ -789,7 +789,7 @@ open class Collection(
789
789
*/
790
790
@JvmOverloads
791
791
fun <T > genCards (
792
- nids : LongArray? ,
792
+ nids : LongArray ,
793
793
model : Model ,
794
794
task : T ? = null
795
795
): ArrayList <Long >? where T : ProgressSender <Int ?>? , T : CancelListener? {
@@ -1036,11 +1036,11 @@ open class Collection(
1036
1036
}
1037
1037
1038
1038
// NOT IN LIBANKI //
1039
- fun cardCount (vararg dids : Long? ): Int {
1039
+ fun cardCount (vararg dids : Long ): Int {
1040
1040
return db.queryScalar(" SELECT count() FROM cards WHERE did IN " + Utils .ids2str(dids))
1041
1041
}
1042
1042
1043
- fun isEmptyDeck (vararg dids : Long? ): Boolean {
1043
+ fun isEmptyDeck (vararg dids : Long ): Boolean {
1044
1044
return cardCount(* dids) == 0
1045
1045
}
1046
1046
@@ -1080,7 +1080,7 @@ open class Collection(
1080
1080
return rem
1081
1081
}
1082
1082
1083
- fun emptyCardReport (cids : List <Long >? ): String {
1083
+ fun emptyCardReport (cids : List <Long >): String {
1084
1084
val rep = StringBuilder ()
1085
1085
db.query(
1086
1086
" select group_concat(ord+1), count(), flds from cards c, notes n " +
@@ -1122,15 +1122,15 @@ open class Collection(
1122
1122
/* * Update field checksums and sort cache, after find&replace, etc.
1123
1123
* @param nids
1124
1124
*/
1125
- fun updateFieldCache (nids : kotlin.collections.Collection <Long >? ) {
1125
+ fun updateFieldCache (nids : kotlin.collections.Collection <Long >) {
1126
1126
val snids = Utils .ids2str(nids)
1127
1127
updateFieldCache(snids)
1128
1128
}
1129
1129
1130
1130
/* * Update field checksums and sort cache, after find&replace, etc.
1131
1131
* @param nids
1132
1132
*/
1133
- fun updateFieldCache (nids : LongArray? ) {
1133
+ fun updateFieldCache (nids : LongArray ) {
1134
1134
val snids = Utils .ids2str(nids)
1135
1135
updateFieldCache(snids)
1136
1136
}
@@ -2307,7 +2307,7 @@ open class Collection(
2307
2307
/* *
2308
2308
* Card Flags *****************************************************************************************************
2309
2309
*/
2310
- fun setUserFlag (flag : Int , cids : List <Long >? ) {
2310
+ fun setUserFlag (flag : Int , cids : List <Long >) {
2311
2311
assert (0 <= flag && flag <= 7 )
2312
2312
db.execute(
2313
2313
" update cards set flags = (flags & ~?) | ?, usn=?, mod=? where id in " + Utils .ids2str(
0 commit comments