summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/amount.cc2
-rw-r--r--src/amount.h2
-rw-r--r--src/entry.cc2
-rw-r--r--src/gnucash.cc13
4 files changed, 10 insertions, 9 deletions
diff --git a/src/amount.cc b/src/amount.cc
index 7f849bff..502f1916 100644
--- a/src/amount.cc
+++ b/src/amount.cc
@@ -810,7 +810,7 @@ void amount_t::annotate(const annotation_t& details)
DEBUG("amounts.commodities", " Annotated amount is " << *this);
}
-bool amount_t::annotated() const
+bool amount_t::is_annotated() const
{
if (! quantity)
throw_(amount_error,
diff --git a/src/amount.h b/src/amount.h
index bcf86ad4..a5a05835 100644
--- a/src/amount.h
+++ b/src/amount.h
@@ -558,7 +558,7 @@ public:
* have been set to (which all default to false).
*/
void annotate(const annotation_t& details);
- bool annotated() const;
+ bool is_annotated() const;
annotation_t& annotation();
const annotation_t& annotation() const {
diff --git a/src/entry.cc b/src/entry.cc
index 799de841..b43970e9 100644
--- a/src/entry.cc
+++ b/src/entry.cc
@@ -282,7 +282,7 @@ bool entry_base_t::finalize()
time_duration_t(0, 0, 0)),
entry ? entry->code : optional<string>());
- if (xact->amount.annotated()) {
+ if (xact->amount.is_annotated()) {
if (ann_amount.annotation().price) {
if (balance.is_null())
balance = basis_cost - final_cost;
diff --git a/src/gnucash.cc b/src/gnucash.cc
index 41990cb0..5a171ace 100644
--- a/src/gnucash.cc
+++ b/src/gnucash.cc
@@ -30,6 +30,7 @@
*/
#include "gnucash.h"
+#include "session.h"
#include "account.h"
namespace ledger {
@@ -85,7 +86,7 @@ static enum action_t {
XACT_NOTE
} action;
-static void startElement(void *userData, const char *name, const char **atts)
+static void startElement(void *, const char *name, const char **)
{
if (std::strcmp(name, "gnc:account") == 0) {
curr_account = new account_t(master_account);
@@ -134,7 +135,7 @@ static void startElement(void *userData, const char *name, const char **atts)
action = XACT_NOTE;
}
-static void endElement(void *userData, const char *name)
+static void endElement(void *, const char *name)
{
if (std::strcmp(name, "gnc:account") == 0) {
assert(curr_account);
@@ -238,7 +239,7 @@ static amount_t convert_number(const string& number,
}
}
-static void dataHandler(void *userData, const char *s, int len)
+static void dataHandler(void *, const char *s, int len)
{
switch (action) {
case ACCOUNT_NAME:
@@ -360,8 +361,8 @@ bool gnucash_parser_t::test(std::istream& in) const
}
unsigned int gnucash_parser_t::parse(std::istream& in,
- session_t& session,
- journal_t& journal,
+ session_t& session,
+ journal_t& journal,
account_t * master,
const path * original_file)
{
@@ -377,7 +378,7 @@ unsigned int gnucash_parser_t::parse(std::istream& in,
count = 0;
action = NO_ACTION;
curr_journal = &journal;
- master_account = master ? master : journal.master;
+ master_account = master ? master : session.master.get();
curr_account = NULL;
curr_entry = NULL;
curr_comm = NULL;