refactor: Rename snake_case fns PascalCase
This commit is contained in:
1 parent
63aaeae401
commit
b7df16ffd7
4 files changed
+6
-6
No files matched your search
@@ -29,7 +29,7 @@
|
||||
_model.get_active_time_decay_points().empty_if_null()
|
||||
.Select(tup => new TimeDecayItem(tup.Item1, tup.Item2, this)));
|
||||
add_item = new DelegateCommand(() => {
|
||||
time_decay_items.insert_sorted_if_distinct(
|
||||
time_decay_items.InsertSortedDistinct(
|
||||
new TimeDecayItem(_new_actual_time.result ?? throw new InvalidOperationException($"'{nameof(new_actual_time)}' does not have a value"), double.NaN, this),
|
||||
Comparer<TimeSpan>.Default.wrap<TimeSpan, TimeDecayItem>(tdi => tdi.actual_time.TimeOfDay));
|
||||
},
|
||||
|
||||
@@ -68,11 +68,11 @@ namespace bts.collections {
|
||||
list.Insert(i < 0 ? ~i : i, value);
|
||||
}
|
||||
|
||||
public static bool insert_sorted_if_distinct<T>(this IList<T> list, T item)
|
||||
public static bool InsertSortedDistinct<T>(this IList<T> list, T item)
|
||||
where T : IComparable<T> =>
|
||||
insert_sorted_if_distinct(list, item, Comparer<T>.Default);
|
||||
InsertSortedDistinct(list, item, Comparer<T>.Default);
|
||||
|
||||
public static bool insert_sorted_if_distinct<T>(this IList<T> list, T item, IComparer<T> comparer) {
|
||||
public static bool InsertSortedDistinct<T>(this IList<T> list, T item, IComparer<T> comparer) {
|
||||
int i = CollectionHelper.binary_search(list, item, comparer);
|
||||
if (i < 0) {
|
||||
list.Insert(~i, item);
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace Spark.Core.Collections {
|
||||
CollectionHelper.binary_search(_values, item, 0, _size, _comparer, _eq_comparer);
|
||||
|
||||
void _insert_and_notify(int index, T item) {
|
||||
ArrayHelper.insert(ref _values, index, item, ref _size);
|
||||
ArrayHelper.Insert(ref _values, index, item, ref _size);
|
||||
CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, item, index));
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Count)));
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(CollectionHelper.indexer_name));
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace bts.utils {
|
||||
return result;
|
||||
}
|
||||
|
||||
public static void insert<T>(ref T[] array, int index, T value, ref int size) {
|
||||
public static void Insert<T>(ref T[] array, int index, T value, ref int size) {
|
||||
// validate size/index
|
||||
if (size < 0)
|
||||
throw ExceptionBuilder.ArgumentOutOfRange.lt_zero(nameof(size));
|
||||
|
||||
Reference in new issue
Block a user