summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-08-17 03:51:28 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-08-17 03:51:28 -0400
commit1c079630cf21c2e257e272897a987c0968571865 (patch)
tree947b04364e9fb38ab63bbdda72d7f85a52da55e7 /src
parent8da86ae078c58390f581ae336a3801fcf8b89d77 (diff)
downloadfork-ledger-1c079630cf21c2e257e272897a987c0968571865.tar.gz
fork-ledger-1c079630cf21c2e257e272897a987c0968571865.tar.bz2
fork-ledger-1c079630cf21c2e257e272897a987c0968571865.zip
Removed more "pending" type comments.
Diffstat (limited to 'src')
-rw-r--r--src/amount.h8
-rw-r--r--src/balance.cc4
-rw-r--r--src/balance.h4
-rw-r--r--src/value.h2
4 files changed, 5 insertions, 13 deletions
diff --git a/src/amount.h b/src/amount.h
index 29634fa6..0c849017 100644
--- a/src/amount.h
+++ b/src/amount.h
@@ -59,7 +59,6 @@ namespace ledger {
class commodity_t;
class annotation_t;
class commodity_pool_t;
-class session_t;
DECLARE_EXCEPTION(amount_error, std::runtime_error);
@@ -87,6 +86,7 @@ class amount_t
>
#endif
{
+public:
/**
* The initialize and shutdown methods ready the amount subsystem
* for use. Normally they are called by `ledger::initialize' and
@@ -95,9 +95,9 @@ class amount_t
static void initialize();
static void shutdown();
- friend class session_t;
-
-public:
+ /**
+ * The amount's decimal precision.
+ */
typedef uint_least16_t precision_t;
/**
diff --git a/src/balance.cc b/src/balance.cc
index bac8d40c..085d32b1 100644
--- a/src/balance.cc
+++ b/src/balance.cc
@@ -175,11 +175,9 @@ balance_t::value(const optional<datetime_t>& moment) const
optional<amount_t>
balance_t::commodity_amount(const optional<const commodity_t&>& commodity) const
{
- // jww (2007-05-20): Needs work
if (! commodity) {
if (amounts.size() == 1) {
- amounts_map::const_iterator i = amounts.begin();
- return i->second;
+ return amounts.begin()->second;
}
else if (amounts.size() > 1) {
// Try stripping annotations before giving an error.
diff --git a/src/balance.h b/src/balance.h
index 33e3dffb..fcf4fe36 100644
--- a/src/balance.h
+++ b/src/balance.h
@@ -85,10 +85,6 @@ public:
amounts_map amounts;
- // jww (2007-05-20): Remove these two by adding access methods
- friend class value_t;
- friend class entry_base_t;
-
/**
* Constructors. balance_t supports similar forms of construction
* to amount_t.
diff --git a/src/value.h b/src/value.h
index 9c6b5112..7a021386 100644
--- a/src/value.h
+++ b/src/value.h
@@ -246,8 +246,6 @@ private:
static intrusive_ptr<storage_t> false_value;
public:
- // jww (2007-05-03): Make these private, and make ledger::initialize
- // a member function of session_t.
static void initialize();
static void shutdown();