From: Keith F. <ven...@us...> - 2005-01-09 00:34:13
|
Update of /cvsroot/planeshift/planeshift/src/server/bulkobjects In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22086 Modified Files: psnpcdialog.cpp Log Message: Fixed compiler warnings. Index: psnpcdialog.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/bulkobjects/psnpcdialog.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** psnpcdialog.cpp 8 Jan 2005 21:46:05 -0000 1.32 --- psnpcdialog.cpp 9 Jan 2005 00:34:04 -0000 1.33 *************** *** 74,78 **** { sent.SetLength(size); ! for (int i=0; i < size; i++) sent[i] = 0; CalcGrade(); } --- 74,81 ---- { sent.SetLength(size); ! ! for (int i=0; i < size; i++) ! sent[i] = 0; ! CalcGrade(); } *************** *** 81,85 **** { grade = 0; ! for (int i=0; i < sent.Length(); i++) grade += sent[i]*sent[i]; } --- 84,89 ---- { grade = 0; ! ! for (size_t i=0; i < sent.Length(); i++) grade += sent[i]*sent[i]; } *************** *** 87,96 **** bool dlgGener::FindNextGener(const csArray<csArray<NPCDialogPhrase*> > & possPhrases) { ! FindNextGener(possPhrases, sent.Length()-1); } bool dlgGener::FindNextGener(const csArray<csArray<NPCDialogPhrase*> > & possPhrases, int pos) { ! if (sent[pos]+1 < possPhrases[pos].Length()) { sent[pos]++; --- 91,100 ---- bool dlgGener::FindNextGener(const csArray<csArray<NPCDialogPhrase*> > & possPhrases) { ! return FindNextGener(possPhrases, sent.Length()-1); } bool dlgGener::FindNextGener(const csArray<csArray<NPCDialogPhrase*> > & possPhrases, int pos) { ! if (sent[pos]+1 < (int) possPhrases[pos].Length()) { sent[pos]++; *************** *** 123,130 **** { csString text; ! for (int i=0; i < sent.Length(); i++) { if (i > 0) text += " "; text += possGenerOfPhrases[i][sent[i]]->phrase; } --- 127,135 ---- { csString text; ! for (size_t i=0; i < sent.Length(); i++) { if (i > 0) text += " "; + text += possGenerOfPhrases[i][sent[i]]->phrase; } *************** *** 341,345 **** csArray<dlgGener*> genList; dlgGener **sortedGens; ! int i; // find possible generalizations of all phrases in our sentence --- 346,350 ---- csArray<dlgGener*> genList; dlgGener **sortedGens; ! size_t i; // find possible generalizations of all phrases in our sentence *************** *** 500,504 **** resp = NULL; ! for (int i=0; i < gens.Length(); i++) { resp = FindResponse(gens[i]->GetText(possGenerOfPhrases), pstext.GetData()); --- 505,509 ---- resp = NULL; ! for (size_t i=0; i < gens.Length(); i++) { resp = FindResponse(gens[i]->GetText(possGenerOfPhrases), pstext.GetData()); |