Skip to content

Commit

Permalink
Improve notes for function call conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts committed Feb 4, 2025
1 parent 9e758a9 commit 792bd64
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions DEVELOPER-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ public:
* [A raw pointer (a T*) is non-owning](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rr-ptr)
* [A raw reference (a T&) is non-owning](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rr-ref)
### Function calling conventions
### Function Parameter calling convention
* Prefer T* over T& when “no argument” is a valid option
* Prefer passing values by reference (`Geometry&`) instead of pointer (`Geometry*`),
particularly for API (public) functions
* Note: many GEOS API functions use pass-by-pointer instead - this is deprecated
* Pass-by-pointer can be used if the argument may be NULL (this is rare for API functions)
### Avoid Many Small Heap Allocations
Expand Down

0 comments on commit 792bd64

Please sign in to comment.