Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make get_wielded_item() return a ref instead of a pointer #51614

Merged
merged 2 commits into from
Sep 14, 2021

Conversation

Fris0uman
Copy link
Contributor

Summary

None

Purpose of change

Apply suggestions from #50286

Describe the solution

get_wielded_item return a reference instead of a pointer

Describe alternatives you've considered

Testing

Compile without error
Run tests locally without errors

  • wield an item > no problem
  • Drop wieled item > no problem
  • throw wieled item > no problem
  • Wield item > save and quit > reload > no problem

Additional context

@Fris0uman Fris0uman requested a review from KorGgenT as a code owner September 14, 2021 17:50
src/npcmove.cpp Outdated Show resolved Hide resolved
src/npcmove.cpp Outdated Show resolved Hide resolved
@actual-nh actual-nh added [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Code: Performance Performance boosting code (CPU, memory, etc.) labels Sep 14, 2021
@kevingranade kevingranade merged commit aa69568 into CleverRaven:master Sep 14, 2021
@Fris0uman Fris0uman deleted the ref_wep branch September 15, 2021 06:35
Venera3 pushed a commit to Venera3/Cataclysm-DDA that referenced this pull request Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Code: Performance Performance boosting code (CPU, memory, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants