From 57101c1b19e1f6c101362b7827b3c72e094f1633 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Tue, 26 Apr 2016 15:42:11 +0200 Subject: [PATCH] added namespace and include to previous commit --- apps/esmtool/esmtool.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/esmtool/esmtool.cpp b/apps/esmtool/esmtool.cpp index c6d6ad6e3..3e5c6aa5d 100644 --- a/apps/esmtool/esmtool.cpp +++ b/apps/esmtool/esmtool.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include @@ -354,7 +355,7 @@ int load(Arguments& info) esm.getRecHeader(flags); EsmTool::RecordBase *record = EsmTool::RecordBase::create(n); - if (record == 0) + if (record == 0) { if (std::find(skipped.begin(), skipped.end(), n.val) == skipped.end()) { @@ -391,16 +392,16 @@ int load(Arguments& info) record->print(); } - if (record->getType().val == ESM::REC_CELL && loadCells && interested) + if (record->getType().val == ESM::REC_CELL && loadCells && interested) { loadCell(record->cast()->get(), esm, info); } - if (save) + if (save) { info.data.mRecords.push_back(record); - } - else + } + else { delete record; } @@ -443,7 +444,7 @@ int clone(Arguments& info) int digitCount = 1; // For a nicer output if (recordCount > 0) - digitCount = (int)log10(recordCount) + 1; + digitCount = (int)std::log10(recordCount) + 1; std::cout << "Loaded " << recordCount << " records:" << std::endl << std::endl;