]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Account.cpp
License: Update GPLv2+ header to match current FSF recommendation
[lugaru.git] / Source / Account.cpp
index 09bf0d1ef3ac4f285f5f4c5c2e5b831a6a1ea146..a42e2f70e8cf76e7857586d974e8756a19e838ae 100644 (file)
@@ -4,20 +4,18 @@ Copyright (C) 2010 - Côme <MCMic> BERNIGAUD
 
 This file is part of Lugaru.
 
-Lugaru is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
+Lugaru is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
 
-This program is distributed in the hope that it will be useful,
+Lugaru is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-See the GNU General Public License for more details.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "Account.h"
@@ -59,7 +57,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 +69,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 +196,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 +252,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;
     }