RFR: 8331193: Return references when possible in GrowableArray [v9]
Johan Sjölen
jsjolen at openjdk.org
Tue May 28 13:00:20 UTC 2024
On Mon, 27 May 2024 10:06:44 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
>> Johan Sjölen has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Merge remote-tracking branch 'origin/return-reference' into return-reference
>> - Use references when using top()
>
> src/hotspot/share/utilities/growableArray.hpp line 173:
>
>> 171: E const& top() const {
>> 172: assert(_len > 0, "empty");
>> 173: return _data[_len - 1];
>
> Suggestion:
>
> return _data[_len - 1];
Oof, thank you.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18975#discussion_r1617199467
More information about the hotspot-dev
mailing list