r16762 - gnucash/trunk/src/engine - Make some parameters const

Phil Longstaff plongstaff at cvs.gnucash.org
Sat Dec 29 12:43:46 EST 2007


Author: plongstaff
Date: 2007-12-29 12:43:46 -0500 (Sat, 29 Dec 2007)
New Revision: 16762
Trac: http://svn.gnucash.org/trac/changeset/16762

Modified:
   gnucash/trunk/src/engine/cap-gains.c
   gnucash/trunk/src/engine/cap-gains.h
Log:
Make some parameters const


Modified: gnucash/trunk/src/engine/cap-gains.c
===================================================================
--- gnucash/trunk/src/engine/cap-gains.c	2007-12-29 10:43:44 UTC (rev 16761)
+++ gnucash/trunk/src/engine/cap-gains.c	2007-12-29 17:43:46 UTC (rev 16762)
@@ -76,7 +76,7 @@
 /* ============================================================== */
 
 gboolean 
-xaccAccountHasTrades (Account *acc)
+xaccAccountHasTrades (const Account *acc)
 {
    gnc_commodity *acc_comm;
    SplitList *splits, *node;
@@ -266,7 +266,7 @@
 /* ============================================================== */
 
 void
-xaccAccountSetDefaultGainAccount (Account *acc, Account *gain_acct)
+xaccAccountSetDefaultGainAccount (Account *acc, const Account *gain_acct)
 {
   KvpFrame *cwd;
   KvpValue *vvv;
@@ -292,7 +292,7 @@
 /* ============================================================== */
 
 Account *
-xaccAccountGetDefaultGainAccount (Account *acc, gnc_commodity * currency)
+xaccAccountGetDefaultGainAccount (const Account *acc, const gnc_commodity * currency)
 {
   Account *gain_acct = NULL;
   KvpFrame *cwd;

Modified: gnucash/trunk/src/engine/cap-gains.h
===================================================================
--- gnucash/trunk/src/engine/cap-gains.h	2007-12-29 10:43:44 UTC (rev 16761)
+++ gnucash/trunk/src/engine/cap-gains.h	2007-12-29 17:43:46 UTC (rev 16762)
@@ -104,7 +104,7 @@
  *    TRUE if this is a trading account, else it returns
  *    FALSE.
  */
-gboolean xaccAccountHasTrades (Account *);
+gboolean xaccAccountHasTrades (const Account *);
 
 /** The xaccAccountFindEarliestOpenLot() method is a handy
  *   utility routine for finding the earliest open lot in
@@ -133,7 +133,7 @@
  *   currency name.  IOf there is no default account for this
  *   currency, NULL will be returned.
  */
-Account * xaccAccountGetDefaultGainAccount (Account *acc, gnc_commodity * currency);
+Account * xaccAccountGetDefaultGainAccount (const Account *acc, const gnc_commodity * currency);
 
 /** The xaccAccountSetDefaultGainAccount() routine can be used 
  *   to set the account to which realized gains/losses will be 
@@ -141,7 +141,7 @@
  *   value of the "/lot-mgmt/gains-act/XXX" key, where XXX is the 
  *   unique currency name of the currency of gains account.
  */
-void xaccAccountSetDefaultGainAccount (Account *acc, Account *gains_acct);
+void xaccAccountSetDefaultGainAccount (Account *acc, const Account *gains_acct);
 
 /** The xaccSplitGetCapGainsSplit() routine returns the split
  *  that records the cap gains for this split.  It returns NULL



More information about the gnucash-changes mailing list