summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/xrmmerge.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx
index f3705fa7b17f..37190fb58623 100644
--- a/l10ntools/source/xrmmerge.cxx
+++ b/l10ntools/source/xrmmerge.cxx
@@ -33,6 +33,7 @@
#include <iostream>
#include <fstream>
#include <vector>
+#include <boost/scoped_array.hpp>
using namespace std;
@@ -327,13 +328,12 @@ void XRMResExport::WorkOnDesc(
ifstream file (sDescFileName.getStr(), ios::in|ios::binary|ios::ate);
if (file.is_open()) {
int size = static_cast<int>(file.tellg());
- char* memblock = new char [size+1];
+ boost::scoped_array<char> memblock(new char [size+1]);
file.seekg (0, ios::beg);
- file.read (memblock, size);
+ file.read (memblock.get(), size);
file.close();
memblock[size] = '\0';
- rText = OString(memblock);
- delete[] memblock;
+ rText = OString(memblock.get());
}
WorkOnText( rOpenTag, rText );
EndOfText( rOpenTag, rOpenTag );