Отформатировать списки параметров по код-стайлу
Больше двух параметров — каждый на отдельной строке (закрывающая скобка в конце последнего); два и меньше — в одну строку. Правило добавлено в docs/spec/Код-стайл-Дейл.md; применено к 628 сигнатурам в 253 файлах.
This commit is contained in:
@@ -68,7 +68,10 @@ public static class AmountParser
|
||||
var occupied = new List<(int Start, int End)>();
|
||||
|
||||
// Свободен ли диапазон (не пересекается с уже занятым конструкцией выше) — прототип _free L106–107.
|
||||
static bool IsFree(List<(int Start, int End)> spans, int start, int end)
|
||||
static bool IsFree(
|
||||
List<(int Start, int End)> spans,
|
||||
int start,
|
||||
int end)
|
||||
{
|
||||
foreach ((int os, int oe) in spans)
|
||||
{
|
||||
@@ -81,7 +84,12 @@ public static class AmountParser
|
||||
return true;
|
||||
}
|
||||
|
||||
void Add(double? from, double? to, string? cur, int start, int end)
|
||||
void Add(
|
||||
double? from,
|
||||
double? to,
|
||||
string? cur,
|
||||
int start,
|
||||
int end)
|
||||
{
|
||||
if (cur is not null && (from is not null || to is not null) && IsFree(occupied, start, end))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user