RFR: 8331193: Return references when possible in GrowableArray [v3]
Johan Sjölen
jsjolen at openjdk.org
Tue Apr 30 09:03:20 UTC 2024
On Mon, 29 Apr 2024 22:58:02 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Small mistakes - FIXED!
>
> src/hotspot/share/utilities/growableArray.hpp line 153:
>
>> 151: E* adr_at(int i) const {
>> 152: assert(0 <= i && i < _len, "illegal index %d for length %d", i, _len);
>> 153: return &_data[i];
>
> (GitHub won't let me put comment on the `adr_at` signature.)
>
> I think there should similarly be const and non-const adr_at, returning pointer to const and non-const respectively.
Done!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18975#discussion_r1584401093
More information about the hotspot-dev
mailing list