]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Account.cpp
Add link to the website in the README
[lugaru.git] / Source / Account.cpp
index 09bf0d1ef3ac4f285f5f4c5c2e5b831a6a1ea146..ce8838bd2588b424bb123864dba7529940e1ec71 100644 (file)
@@ -59,7 +59,7 @@ Account* Account::add(string name)
 Account* Account::get(int i)
 {
 
-    if ((i >= 0) && (i < accounts.size())) {
+    if ((i >= 0) && (i < int(accounts.size()))) {
         return accounts[i];
     } else
         return NULL;
@@ -71,7 +71,7 @@ void Account::destroy(int i)
 }
 Account* Account::destroy(Account* a)
 {
-    for (int i = 0; i < accounts.size(); i++) {
+    for (unsigned i = 0; i < accounts.size(); i++) {
         if (accounts[i] == a) {
             accounts.erase(accounts.begin() + i);
             return NULL;
@@ -198,7 +198,7 @@ Account* Account::loadFile(string filename)
 void Account::saveFile(string filename, Account* accountactive)
 {
     FILE *tfile;
-    int j;
+    unsigned j;
 
     tfile = fopen(ConvertFileName(filename.c_str(), "wb"), "wb" );
     if (tfile) {
@@ -254,7 +254,7 @@ void Account::saveFile(string filename, Account* accountactive)
 
 int Account::indice(Account* a)
 {
-    for (int i = 0; i < accounts.size(); i++) {
+    for (unsigned i = 0; i < accounts.size(); i++) {
         if (accounts[i] == a)
             return i;
     }