1
0
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:
David Steele
2021-04-20 18:43:16 -04:00
parent ed0d48f52c
commit fd69357302
46 changed files with 147 additions and 147 deletions

View File

@ -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);
}