From c7e65b12ff3e7a795a583bf655784126e886289f Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Wed, 13 Feb 2013 20:43:00 +0100 Subject: Reduce scope xrmmerge.cxx Change-Id: I70018ce13dc5dc45d59fdb339e9d0a14348a4195 --- l10ntools/source/xrmmerge.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'l10ntools/source/xrmmerge.cxx') diff --git a/l10ntools/source/xrmmerge.cxx b/l10ntools/source/xrmmerge.cxx index 5871948124ed..680f0cacfa17 100644 --- a/l10ntools/source/xrmmerge.cxx +++ b/l10ntools/source/xrmmerge.cxx @@ -400,12 +400,10 @@ void XRMResExport::WorkOnDesc( rtl::OString sDescFileName( sInputFileName.replaceAll("description.xml", rtl::OString())); sDescFileName += GetAttribute( rOpenTag, "xlink:href" ); - int size; - char * memblock; ifstream file (sDescFileName.getStr(), ios::in|ios::binary|ios::ate); if (file.is_open()) { - size = static_cast(file.tellg()); - memblock = new char [size+1]; + int size = static_cast(file.tellg()); + char* memblock = new char [size+1]; file.seekg (0, ios::beg); file.read (memblock, size); file.close(); -- cgit