diff --git a/applications/test/DynamicList/Test-DynamicList.C b/applications/test/DynamicList/Test-DynamicList.C index c03dad9eac..7765269cae 100644 --- a/applications/test/DynamicList/Test-DynamicList.C +++ b/applications/test/DynamicList/Test-DynamicList.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017-2019 OpenCFD Ltd. + Copyright (C) 2017-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -333,7 +333,7 @@ int main(int argc, char *argv[]) labelRange(40, 18), // trailing portion labelRange(-5, 10), // leading portion labelRange(10, 8), // mid-portion - labelRange(0, input1.size()), // everything + labelRange(input1.size()), // everything } ) { diff --git a/applications/test/IjkField/Test-IjkField.C b/applications/test/IjkField/Test-IjkField.C index 03dd7baf2a..8e40da95c9 100644 --- a/applications/test/IjkField/Test-IjkField.C +++ b/applications/test/IjkField/Test-IjkField.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2020 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -59,7 +59,7 @@ int main(int argc, char *argv[]) Info<< "addressing: " << addr1.sizes() << nl; Info<< "index of (2,2,2) " << addr1.index(2,2,2) << nl; - for (const label idx : labelRange(0, addr1.size())) + for (const label idx : labelRange(addr1.size())) { Info<< "index of " << idx << " => " << addr1.index(idx) << nl; } diff --git a/applications/test/List/Test-List.C b/applications/test/List/Test-List.C index 9b6d3377ef..a09ac01ab6 100644 --- a/applications/test/List/Test-List.C +++ b/applications/test/List/Test-List.C @@ -327,7 +327,7 @@ int main(int argc, char *argv[]) Info<< "normal: " << wList << nl; } - // test SubList and labelRange + // Test SubList and labelRange { Info<< nl; labelList longLabelList = identity(25); @@ -363,7 +363,7 @@ int main(int argc, char *argv[]) // and complete misses longLabelList[{500,50}] = 100; - // labelRange automatically suppresses -ve size -> nop + // -ve size suppressed by internal 'validateRange' = no-op longLabelList[{5,-5}] = 42; longLabelList[{21,100}] = 42; @@ -379,7 +379,7 @@ int main(int argc, char *argv[]) //Nope: sort(longLabelList[labelRange(18,5)]); { // Instead - UList