You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-03 00:26:59 +02:00
Add const to inline functions where appropriate.
This lets the compiler know that these variables are not modified which should lead to better optimization. Smart compilers should be able to figure this out on their own, but marking parameters const is still good for documentation.
This commit is contained in:
@ -32,7 +32,7 @@ PgClient *pgClientOpen(PgClient *this);
|
||||
|
||||
// Move to a new parent mem context
|
||||
__attribute__((always_inline)) static inline PgClient *
|
||||
pgClientMove(PgClient *this, MemContext *parentNew)
|
||||
pgClientMove(PgClient *const this, MemContext *const parentNew)
|
||||
{
|
||||
return objMove(this, parentNew);
|
||||
}
|
||||
@ -47,7 +47,7 @@ void pgClientClose(PgClient *this);
|
||||
Destructor
|
||||
***********************************************************************************************************************************/
|
||||
__attribute__((always_inline)) static inline void
|
||||
pgClientFree(PgClient *this)
|
||||
pgClientFree(PgClient *const this)
|
||||
{
|
||||
objFree(this);
|
||||
}
|
||||
|
Reference in New Issue
Block a user