Removed some dead code

This commit is contained in:
John Wiegley 2009-06-27 01:32:46 +01:00
parent 2ef1934bb0
commit bf30f989f6
4 changed files with 4 additions and 19 deletions

View file

@ -74,7 +74,6 @@ class account_t : public scope_t
posts_deque posts;
bool known;
mutable void * data;
mutable string _fullname;
account_t(account_t * _parent = NULL,
@ -82,7 +81,7 @@ class account_t : public scope_t
const optional<string>& _note = none)
: scope_t(), parent(_parent), name(_name), note(_note),
depth(static_cast<unsigned short>(parent ? parent->depth + 1 : 0)),
known(false), data(NULL) {
known(false) {
TRACE_CTOR(account_t, "account_t *, const string&, const string&");
}
account_t(const account_t& other)
@ -92,10 +91,8 @@ class account_t : public scope_t
note(other.note),
depth(other.depth),
accounts(other.accounts),
known(other.known),
data(NULL) {
known(other.known) {
TRACE_CTOR(account_t, "copy");
assert(other.data == NULL);
}
~account_t();

View file

@ -884,8 +884,7 @@ void forecast_posts::flush()
item_handler<post_t>::operator()(temp);
if (temp.has_xdata() &&
temp.xdata().has_flags(POST_EXT_MATCHES)) {
if (temp.has_xdata() && temp.xdata().has_flags(POST_EXT_MATCHES)) {
bind_scope_t bound_scope(context, temp);
if (! pred(bound_scope))
break;

View file

@ -46,7 +46,7 @@ format_posts::format_posts(report_t& _report,
: report(_report), last_xact(NULL), last_post(NULL),
print_raw(_print_raw)
{
TRACE_CTOR(format_posts, "report&, const string&");
TRACE_CTOR(format_posts, "report&, const string&, bool");
const char * f = format.c_str();

View file

@ -171,16 +171,6 @@ account_t& accounts_getitem(account_t& account, int i)
return *(*elem).second;
}
PyObject * py_account_get_data(account_t& account)
{
return (PyObject *) account.data;
}
void py_account_set_data(account_t& account, PyObject * obj)
{
account.data = obj;
}
account_t * py_find_account_1(journal_t& journal, const string& name)
{
return journal.find_account(name);
@ -342,7 +332,6 @@ void export_journal()
.def_readwrite("name", &account_t::name)
.def_readwrite("note", &account_t::note)
.def_readonly("depth", &account_t::depth)
.add_property("data", py_account_get_data, py_account_set_data)
.def_readonly("ident", &account_t::ident)
.def("fullname", &account_t::fullname)