On Fri, 5 May 2023 02:13:32 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove return variable from remove lambda, fix formatting. > > src/hotspot/share/utilities/resizeableResourceHash.hpp line 91: > >> 89: // Calculate next "good" hashtable size based on requested count >> 90: int calculate_resize(bool use_large_table_sizes) const { >> 91: const int resize_factor = 2.0; // by how much we will resize >> using current number of entries > > Nit: extra spaces brefore the '=' sign. > Q: Why is a FP constant assigned to the integer variable? The 2.0 constant and spaces were left over from the old implementation. I just fixed them. > src/hotspot/share/utilities/resourceHash.hpp line 234: > >> 232: if (node != nullptr) { >> 233: *ptr = node->_next; >> 234: bool cont = function(node->_key, node->_value); > > Q: The local `cont` is not used. Just wanted to check if anything is missed > here. > Also, what does this name mean? Should it be named `cond` instead? The 'cont' variable was because I cut/pasted the lambda from iterate and in that case means to continue. That's also not needed for 'remove' so I removed the return variable for the lambda function. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13818#discussion_r1186010915 PR Review Comment: https://git.openjdk.org/jdk/pull/13818#discussion_r1186011484