This is an automated email from the ASF dual-hosted git repository.
panxiaolei pushed a commit to branch clucene
in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git
The following commit(s) were added to refs/heads/clucene by this push:
new a8d1f58f393 fix wshadow check fail on PriorityQueue::initialize (#364)
a8d1f58f393 is described below
commit a8d1f58f393ef3ed13cedf82c77a3581ab5d57ef
Author: Pxl <[email protected]>
AuthorDate: Wed Oct 29 10:19:46 2025 +0800
fix wshadow check fail on PriorityQueue::initialize (#364)
This PR improves code clarity by renaming a parameter in the initialize
method to avoid shadowing a class member variable.
The parameter maxSize in the initialize method is renamed to
inputMaxSize to distinguish it from the class member variable this->maxSize
---
src/core/CLucene/util/PriorityQueue.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/core/CLucene/util/PriorityQueue.h
b/src/core/CLucene/util/PriorityQueue.h
index 59cb0a8d312..355144f09e2 100644
--- a/src/core/CLucene/util/PriorityQueue.h
+++ b/src/core/CLucene/util/PriorityQueue.h
@@ -73,17 +73,17 @@ class CLUCENE_INLINE_EXPORT PriorityQueue {
virtual bool lessThan(_type a, _type b)=0;
// Subclass constructors must call this.
- void initialize(const int32_t maxSize, bool deleteOnClear){
+ void initialize(const int32_t inputMaxSize, bool deleteOnClear){
_size = 0;
dk = deleteOnClear;
int32_t heapSize;
- if (0 == maxSize)
+ if (0 == inputMaxSize)
// We allocate 1 extra to avoid if statement in
top()
heapSize = 2;
else
- heapSize = maxSize + 1;
+ heapSize = inputMaxSize + 1;
heap = _CL_NEWARRAY(_type,heapSize);
- this->maxSize = maxSize;
+ this->maxSize = inputMaxSize;
}
public:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]