From 55bc3443a050df59e39f28e19015987c4c65462b Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Wed, 13 Nov 2019 13:17:34 +0000 Subject: [PATCH] Added copyright notice to merge sort functions --- include/etl/forward_list.h | 26 +++++++++++++++++++++++--- include/etl/intrusive_forward_list.h | 26 +++++++++++++++++++++++--- include/etl/intrusive_list.h | 26 +++++++++++++++++++++++--- include/etl/list.h | 26 +++++++++++++++++++++++--- 4 files changed, 92 insertions(+), 12 deletions(-) diff --git a/include/etl/forward_list.h b/include/etl/forward_list.h index 9c1ffe3b..6edca31f 100644 --- a/include/etl/forward_list.h +++ b/include/etl/forward_list.h @@ -1185,9 +1185,29 @@ namespace etl } //************************************************************************* - /// Sort using in-place merge sort algorithm. - /// Uses a supplied predicate function or functor. - /// This is not my algorithm. I got it off the web somewhere. + /// Stable sort using in-place merge sort algorithm. + /// Copyright 2001 Simon Tatham. + /// + /// Permission is hereby granted, free of charge, to any person + /// obtaining a copy of this software and associated documentation + /// files (the "Software"), to deal in the Software without + /// restriction, including without limitation the rights to use, + /// copy, modify, merge, publish, distribute, sublicense, and/or + /// sell copies of the Software, and to permit persons to whom the + /// Software is furnished to do so, subject to the following + /// conditions: + /// + /// The above copyright notice and this permission notice shall be + /// included in all copies or substantial portions of the Software. + /// + /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + /// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + /// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + /// NONINFRINGEMENT. IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR + /// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + /// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + /// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + /// SOFTWARE. //************************************************************************* template void sort(TCompare compare) diff --git a/include/etl/intrusive_forward_list.h b/include/etl/intrusive_forward_list.h index 7303e984..d2265bb6 100644 --- a/include/etl/intrusive_forward_list.h +++ b/include/etl/intrusive_forward_list.h @@ -715,9 +715,29 @@ namespace etl } //************************************************************************* - /// Sort using in-place merge sort algorithm. - /// Uses a supplied predicate function or functor. - /// This is not my algorithm. I got it off the web somewhere. + /// Stable sort using in-place merge sort algorithm. + /// Copyright 2001 Simon Tatham. + /// + /// Permission is hereby granted, free of charge, to any person + /// obtaining a copy of this software and associated documentation + /// files (the "Software"), to deal in the Software without + /// restriction, including without limitation the rights to use, + /// copy, modify, merge, publish, distribute, sublicense, and/or + /// sell copies of the Software, and to permit persons to whom the + /// Software is furnished to do so, subject to the following + /// conditions: + /// + /// The above copyright notice and this permission notice shall be + /// included in all copies or substantial portions of the Software. + /// + /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + /// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + /// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + /// NONINFRINGEMENT. IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR + /// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + /// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + /// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + /// SOFTWARE. //************************************************************************* template void sort(TCompare compare) diff --git a/include/etl/intrusive_list.h b/include/etl/intrusive_list.h index c3fde511..2b250c94 100644 --- a/include/etl/intrusive_list.h +++ b/include/etl/intrusive_list.h @@ -784,9 +784,29 @@ namespace etl } //************************************************************************* - /// Sort using in-place merge sort algorithm. - /// Uses a supplied predicate function or functor. - /// This is not my algorithm. I got it off the web somewhere. + /// Stable sort using in-place merge sort algorithm. + /// Copyright 2001 Simon Tatham. + /// + /// Permission is hereby granted, free of charge, to any person + /// obtaining a copy of this software and associated documentation + /// files (the "Software"), to deal in the Software without + /// restriction, including without limitation the rights to use, + /// copy, modify, merge, publish, distribute, sublicense, and/or + /// sell copies of the Software, and to permit persons to whom the + /// Software is furnished to do so, subject to the following + /// conditions: + /// + /// The above copyright notice and this permission notice shall be + /// included in all copies or substantial portions of the Software. + /// + /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + /// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + /// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + /// NONINFRINGEMENT. IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR + /// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + /// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + /// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + /// SOFTWARE. //************************************************************************* template void sort(TCompare compare) diff --git a/include/etl/list.h b/include/etl/list.h index 0c10d42d..20cfb9f8 100644 --- a/include/etl/list.h +++ b/include/etl/list.h @@ -1606,9 +1606,29 @@ namespace etl } //************************************************************************* - /// Sort using in-place merge sort algorithm. - /// Uses a supplied predicate function or functor. - /// This is not my algorithm. I got it off the web somewhere. + /// Stable sort using in-place merge sort algorithm. + /// Copyright 2001 Simon Tatham. + /// + /// Permission is hereby granted, free of charge, to any person + /// obtaining a copy of this software and associated documentation + /// files (the "Software"), to deal in the Software without + /// restriction, including without limitation the rights to use, + /// copy, modify, merge, publish, distribute, sublicense, and/or + /// sell copies of the Software, and to permit persons to whom the + /// Software is furnished to do so, subject to the following + /// conditions: + /// + /// The above copyright notice and this permission notice shall be + /// included in all copies or substantial portions of the Software. + /// + /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + /// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + /// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + /// NONINFRINGEMENT. IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR + /// ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + /// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + /// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + /// SOFTWARE. //************************************************************************* template void sort(TCompare compare)