diff options
| author | Chaplain <aionthefirst@gmail.com> | 2012-08-20 11:05:50 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2012-08-20 11:05:50 +0200 |
| commit | fb1ac16b0ce27567dc4bb435ee4fa0b0b228e4ad (patch) | |
| tree | 55e04a5e0d7ffe9535a08b6195ef2ba1f7043dbe /src/tools/vmap4_extractor | |
| parent | 28c0874873a3b6ec32a644d0c458520c2e5e7633 (diff) | |
Core/Misc: Some fixes here and there
Closes #7277
Diffstat (limited to 'src/tools/vmap4_extractor')
| -rw-r--r-- | src/tools/vmap4_extractor/vmapexport.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/tools/vmap4_extractor/vmapexport.cpp b/src/tools/vmap4_extractor/vmapexport.cpp index e60a773c6de..126a543400c 100644 --- a/src/tools/vmap4_extractor/vmapexport.cpp +++ b/src/tools/vmap4_extractor/vmapexport.cpp @@ -382,9 +382,9 @@ bool processArgv(int argc, char ** argv, const char *versionString) { bool result = true; hasInputPathParam = false; - bool preciseVectorData = false; + preciseVectorData = false; - for(int i=1; i< argc; ++i) + for(int i = 1; i < argc; ++i) { if(strcmp("-s",argv[i]) == 0) { @@ -447,7 +447,7 @@ int main(int argc, char ** argv) const char *versionString = "V4.00 2012_02"; // Use command line arguments, when some - if(!processArgv(argc, argv, versionString)) + if (!processArgv(argc, argv, versionString)) return 1; // some simple check if working dir is dirty @@ -469,7 +469,7 @@ int main(int argc, char ** argv) printf("Extract %s. Beginning work ....\n",versionString); //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx // Create the working directory - if(mkdir(szWorkDirWmo + if (mkdir(szWorkDirWmo #ifdef __linux__ , 0711 #endif @@ -482,11 +482,11 @@ int main(int argc, char ** argv) for (size_t i=0; i < archiveNames.size(); ++i) { MPQArchive *archive = new MPQArchive(archiveNames[i].c_str()); - if(!gOpenArchives.size() || gOpenArchives.front() != archive) + if (gOpenArchives.empty() || gOpenArchives.front() != archive) delete archive; } - if(gOpenArchives.empty()) + if (gOpenArchives.empty()) { printf("FATAL ERROR: None MPQ archive found by path '%s'. Use -d option with proper path.\n",input_path); return 1; @@ -494,15 +494,15 @@ int main(int argc, char ** argv) ReadLiquidTypeTableDBC(); // extract data - if(success) + if (success) success = ExtractWmo(); //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx //map.dbc - if(success) + if (success) { DBCFile * dbc = new DBCFile("DBFilesClient\\Map.dbc"); - if(!dbc->open()) + if (!dbc->open()) { delete dbc; printf("FATAL ERROR: Map.dbc not found in data file.\n"); @@ -510,7 +510,7 @@ int main(int argc, char ** argv) } map_count=dbc->getRecordCount (); map_ids=new map_id[map_count]; - for(unsigned int x=0;x<map_count;++x) + for (unsigned int x=0;x<map_count;++x) { map_ids[x].id=dbc->getRecord (x).getUInt(0); strcpy(map_ids[x].name,dbc->getRecord(x).getString(1)); @@ -527,7 +527,7 @@ int main(int argc, char ** argv) } printf("\n"); - if(!success) + if (!success) { printf("ERROR: Extract %s. Work NOT complete.\n Precise vector data=%d.\nPress any key.\n",versionString, preciseVectorData); getchar(); |
