From 81194c1d71777844fd3b5d27ff460bc49cfb5c0c Mon Sep 17 00:00:00 2001 From: Vaclav Petras Date: Thu, 24 Oct 2024 15:36:49 -0400 Subject: [PATCH] lib/iostream: Remove redundant tempate parameters In C++20, repeating template parameter names with the name of the class is no longer allowed as it is redundant (https://cplusplus.github.io/CWG/issues/2237.html). The new code is valid also in C++17, but the old code is not accepted in C++20. --- include/grass/iostream/replacementHeap.h | 6 +++--- include/grass/iostream/replacementHeapBlock.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/grass/iostream/replacementHeap.h b/include/grass/iostream/replacementHeap.h index 485d4cef99b..30c309cdda2 100644 --- a/include/grass/iostream/replacementHeap.h +++ b/include/grass/iostream/replacementHeap.h @@ -101,10 +101,10 @@ class ReplacementHeap { public: // allocate array mergeHeap and the runs in runList - ReplacementHeap(size_t arity, queue *runList); + ReplacementHeap(size_t arity, queue *runList); // delete array mergeHeap - ~ReplacementHeap(); + ~ReplacementHeap(); // is heap empty? int empty() const { return (size == 0); } @@ -159,7 +159,7 @@ ReplacementHeap::ReplacementHeap(size_t g_arity, /*****************************************************************/ template -ReplacementHeap::~ReplacementHeap() +ReplacementHeap::~ReplacementHeap() { if (!empty()) { diff --git a/include/grass/iostream/replacementHeapBlock.h b/include/grass/iostream/replacementHeapBlock.h index c1596d67585..f4614eb838b 100644 --- a/include/grass/iostream/replacementHeapBlock.h +++ b/include/grass/iostream/replacementHeapBlock.h @@ -102,10 +102,10 @@ class ReplacementHeapBlock { public: // allocate array mergeHeap, where the streams are stored in runList - ReplacementHeapBlock(queue *> *runList); + ReplacementHeapBlock(queue *> *runList); // delete array mergeHeap - ~ReplacementHeapBlock(); + ~ReplacementHeapBlock(); // is heap empty? int empty() const { return (size == 0); } @@ -161,7 +161,7 @@ ReplacementHeapBlock::ReplacementHeapBlock( /*****************************************************************/ template -ReplacementHeapBlock::~ReplacementHeapBlock() +ReplacementHeapBlock::~ReplacementHeapBlock() { if (!empty()) {