[geos-commits] [SCM] GEOS branch main updated. 792bd641d45f83fc20acb7c01230d7b571b2c3b5

git at osgeo.org git at osgeo.org
Tue Feb 4 11:40:04 PST 2025


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".

The branch, main has been updated
       via  792bd641d45f83fc20acb7c01230d7b571b2c3b5 (commit)
      from  9e758a90052a3946a75d8dbed206789665d55944 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 792bd641d45f83fc20acb7c01230d7b571b2c3b5
Author: Martin Davis <mtnclimb at gmail.com>
Date:   Tue Feb 4 11:39:42 2025 -0800

    Improve notes for function call conventions

diff --git a/DEVELOPER-NOTES.md b/DEVELOPER-NOTES.md
index c21bbbf70..78989dd8c 100644
--- a/DEVELOPER-NOTES.md
+++ b/DEVELOPER-NOTES.md
@@ -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
 

-----------------------------------------------------------------------

Summary of changes:
 DEVELOPER-NOTES.md | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list