From bf25a103264c1b333fb742fd8d975caafa7bbb5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Sun, 14 Aug 2011 18:21:26 +0200 Subject: [PATCH] USe struct instead of class for data types --- src/model/Account.h | 5 +---- src/model/AccountAmount.h | 4 ++-- src/model/Category.h | 3 +-- src/model/Operation.h | 3 +-- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/model/Account.h b/src/model/Account.h index 3cf953c..e49ee0f 100644 --- a/src/model/Account.h +++ b/src/model/Account.h @@ -20,12 +20,9 @@ #ifndef ACCOUNT_H #define ACCOUNT_H -#include -#include #include -class Account { -public: +struct Account { wxString id; wxString name; wxString number; diff --git a/src/model/AccountAmount.h b/src/model/AccountAmount.h index 79bd690..a7dbc64 100644 --- a/src/model/AccountAmount.h +++ b/src/model/AccountAmount.h @@ -20,11 +20,11 @@ #ifndef ACCOUNTAMOUNT_H #define ACCOUNTAMOUNT_H -class AccountAmount { -public: +struct AccountAmount { wxString account; int month; int year; + bool operator()(const AccountAmount& x, const AccountAmount& y) const { long x1, y1; diff --git a/src/model/Category.h b/src/model/Category.h index 7eec57a..f1c714c 100644 --- a/src/model/Category.h +++ b/src/model/Category.h @@ -20,9 +20,8 @@ #ifndef CATEGORY_H #define CATEGORY_H -class Category +struct Category { -public: wxString id; wxString parent; wxString name; diff --git a/src/model/Operation.h b/src/model/Operation.h index 842ca47..f9504e2 100644 --- a/src/model/Operation.h +++ b/src/model/Operation.h @@ -23,8 +23,7 @@ #include #include -class Operation { -public: +struct Operation { wxString id; wxString parent; unsigned int day;