Changed: #1096 Build error with gcc (patch provided by abelgar)

This commit is contained in:
kervala 2010-09-23 13:04:08 +02:00
parent e6a67d807a
commit 66c6137eed
4 changed files with 16 additions and 11 deletions

View file

@ -689,9 +689,9 @@ public:
IsRef(false), IsRef(false),
IsType(false), IsType(false),
IsKey(false), IsKey(false),
Id(0),
Column(-1), Column(-1),
Columns(-1), Columns(-1)
Id(0)
{ {
} }

View file

@ -272,8 +272,9 @@ int extractBotNames(int argc, char *argv[])
//------------------------------------------------------------------- //-------------------------------------------------------------------
// init the sheets // init the sheets
CSheetId::init(false); CSheetId::init(false);
char *PACKED_SHEETS_NAME = "bin/translation_tools_creature.packed_sheets"; const string PACKED_SHEETS_NAME = "bin/translation_tools_creature.packed_sheets";
loadForm("creature", PACKED_SHEETS_NAME, Creatures, false, false); loadForm("creature", PACKED_SHEETS_NAME, Creatures, false, false);
if (Creatures.empty()) if (Creatures.empty())
{ {
for (uint i=0;i<georgesPaths.size();++i) for (uint i=0;i<georgesPaths.size();++i)

View file

@ -198,7 +198,8 @@ void extractNewWords(string workSheetFileName, string columnId, IWordListBuilder
return; return;
} }
// get the key column index // get the key column index
uint keyColIndex; uint keyColIndex = 0;
if(!workSheet.findCol(columnId, keyColIndex)) if(!workSheet.findCol(columnId, keyColIndex))
{ {
nlwarning("Error: Don't find the column '%s'. '%s' Aborted", columnId.c_str(), workSheetFileName.c_str()); nlwarning("Error: Don't find the column '%s'. '%s' Aborted", columnId.c_str(), workSheetFileName.c_str());

View file

@ -313,7 +313,8 @@ int readLanguages()
LOG("Error : the file languages.txt is empty !\n"); LOG("Error : the file languages.txt is empty !\n");
return 1; return 1;
} }
LOG("Found %u language code\n", Languages.size());
LOG("Found %u language code\n", (uint) Languages.size());
return 0; return 0;
} }
@ -1378,7 +1379,7 @@ bool mergeWorksheetDiff(const std::string filename, TWorksheet &sheet, bool only
return false; return false;
makeHashCode(diff, false); makeHashCode(diff, false);
uint cmdCol; uint cmdCol = 0;
if (!diff.findCol(ucstring("DIFF_CMD"), cmdCol)) if (!diff.findCol(ucstring("DIFF_CMD"), cmdCol))
{ {
LOG("Can't find DIFF_CMD column in %s ! Invalid diff file.\n", CFile::getFilename(fileList[i]).c_str()); LOG("Can't find DIFF_CMD column in %s ! Invalid diff file.\n", CFile::getFilename(fileList[i]).c_str());
@ -1490,7 +1491,7 @@ public:
TWorksheet::TRow row(context.Reference.ColCount+1); TWorksheet::TRow row(context.Reference.ColCount+1);
for (uint j=0; j<context.Addition.ColCount; ++j) for (uint j=0; j<context.Addition.ColCount; ++j)
{ {
uint colIndex; uint colIndex = 0;
if (context.Reference.findCol(context.Addition.Data[0][j], colIndex)) if (context.Reference.findCol(context.Addition.Data[0][j], colIndex))
{ {
row[colIndex+1] = context.Addition.Data[addIndex][j]; row[colIndex+1] = context.Addition.Data[addIndex][j];
@ -1508,7 +1509,7 @@ public:
TWorksheet::TRow row(context.Reference.ColCount+1); TWorksheet::TRow row(context.Reference.ColCount+1);
for (uint j=0; j<context.Reference.ColCount; ++j) for (uint j=0; j<context.Reference.ColCount; ++j)
{ {
uint colIndex; uint colIndex = 0;
if (context.Reference.findCol(context.Reference.Data[0][j], colIndex)) if (context.Reference.findCol(context.Reference.Data[0][j], colIndex))
{ {
row[colIndex+1] = context.Reference.Data[refIndex][j]; row[colIndex+1] = context.Reference.Data[refIndex][j];
@ -1527,15 +1528,17 @@ public:
// copy the old content (this fill data in column that don't exist in addition worksheet) // copy the old content (this fill data in column that don't exist in addition worksheet)
row = context.Reference.Data[refIndex]; row = context.Reference.Data[refIndex];
row.insert(row.begin(), ucstring()); row.insert(row.begin(), ucstring());
// changed element // changed element
for (uint j=0; j<context.Addition.ColCount; ++j) for (uint j=0; j<context.Addition.ColCount; ++j)
{ {
uint colIndex; uint colIndex = 0;
if (context.Reference.findCol(context.Addition.Data[0][j], colIndex)) if (context.Reference.findCol(context.Addition.Data[0][j], colIndex))
{ {
row[colIndex+1] = context.Addition.Data[addIndex][j]; row[colIndex+1] = context.Addition.Data[addIndex][j];
} }
} }
char temp[1024]; char temp[1024];
sprintf(temp, "DIFF CHANGED %u ", addIndex); sprintf(temp, "DIFF CHANGED %u ", addIndex);
row[0] = temp; row[0] = temp;
@ -3144,7 +3147,7 @@ int main(int argc, char *argv[])
// create the diff version. // create the diff version.
char temp[1024]; char temp[1024];
sprintf(temp, "%8.8X", ::time(NULL)); sprintf(temp, "%8.8X", (uint) ::time(NULL));
diffVersion = temp; diffVersion = temp;
if (strcmp(argv[1], "make_work") == 0) if (strcmp(argv[1], "make_work") == 0)