Kaydet (Commit) 7d4a6946 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

unodevtools: loplugin:cstylecast

Change-Id: Id4bd8bb8361204ae281a090840b08c502e5b4a7a
üst eff69c6b
...@@ -1056,16 +1056,16 @@ void generateSkeleton(ProgramOptions const & options, ...@@ -1056,16 +1056,16 @@ void generateSkeleton(ProgramOptions const & options,
*pofs << (nm > 0 ? "// closing namespace\n\n" : "\n"); *pofs << (nm > 0 ? "// closing namespace\n\n" : "\n");
} }
if ( !standardout && pofs && ((std::ofstream*)pofs)->is_open()) { if ( !standardout && pofs && static_cast<std::ofstream*>(pofs)->is_open()) {
((std::ofstream*)pofs)->close(); static_cast<std::ofstream*>(pofs)->close();
delete pofs; delete pofs;
OSL_VERIFY(makeValidTypeFile(compFileName, tmpFileName, false)); OSL_VERIFY(makeValidTypeFile(compFileName, tmpFileName, false));
} }
} catch (CannotDumpException & e) { } catch (CannotDumpException & e) {
std::cerr << "ERROR: " << e.getMessage() << "\n"; std::cerr << "ERROR: " << e.getMessage() << "\n";
if ( !standardout ) { if ( !standardout ) {
if (pofs && ((std::ofstream*)pofs)->is_open()) { if (pofs && static_cast<std::ofstream*>(pofs)->is_open()) {
((std::ofstream*)pofs)->close(); static_cast<std::ofstream*>(pofs)->close();
delete pofs; delete pofs;
} }
// remove existing type file if something goes wrong to ensure // remove existing type file if something goes wrong to ensure
...@@ -1219,16 +1219,16 @@ void generateCalcAddin(ProgramOptions const & options, ...@@ -1219,16 +1219,16 @@ void generateCalcAddin(ProgramOptions const & options,
generateCompFunctions(*pofs, nmspace); generateCompFunctions(*pofs, nmspace);
if ( !standardout && pofs && ((std::ofstream*)pofs)->is_open()) { if ( !standardout && pofs && static_cast<std::ofstream*>(pofs)->is_open()) {
((std::ofstream*)pofs)->close(); static_cast<std::ofstream*>(pofs)->close();
delete pofs; delete pofs;
OSL_VERIFY(makeValidTypeFile(compFileName, tmpFileName, false)); OSL_VERIFY(makeValidTypeFile(compFileName, tmpFileName, false));
} }
} catch (CannotDumpException & e) { } catch (CannotDumpException & e) {
std::cerr << "ERROR: " << e.getMessage() << "\n"; std::cerr << "ERROR: " << e.getMessage() << "\n";
if ( !standardout ) { if ( !standardout ) {
if (pofs && ((std::ofstream*)pofs)->is_open()) { if (pofs && static_cast<std::ofstream*>(pofs)->is_open()) {
((std::ofstream*)pofs)->close(); static_cast<std::ofstream*>(pofs)->close();
delete pofs; delete pofs;
} }
// remove existing type file if something goes wrong to ensure // remove existing type file if something goes wrong to ensure
......
...@@ -911,16 +911,16 @@ void generateSkeleton(ProgramOptions const & options, ...@@ -911,16 +911,16 @@ void generateSkeleton(ProgramOptions const & options,
interfaces, properties, attributes, propertyhelper, interfaces, properties, attributes, propertyhelper,
supportxcomponent); supportxcomponent);
if ( !standardout && pofs && ((std::ofstream*)pofs)->is_open()) { if ( !standardout && pofs && static_cast<std::ofstream*>(pofs)->is_open()) {
((std::ofstream*)pofs)->close(); static_cast<std::ofstream*>(pofs)->close();
delete pofs; delete pofs;
OSL_VERIFY(makeValidTypeFile(compFileName, tmpFileName, false)); OSL_VERIFY(makeValidTypeFile(compFileName, tmpFileName, false));
} }
} catch (CannotDumpException & e) { } catch (CannotDumpException & e) {
std::cerr << "ERROR: " << e.getMessage() << "\n"; std::cerr << "ERROR: " << e.getMessage() << "\n";
if ( !standardout ) { if ( !standardout ) {
if (pofs && ((std::ofstream*)pofs)->is_open()) { if (pofs && static_cast<std::ofstream*>(pofs)->is_open()) {
((std::ofstream*)pofs)->close(); static_cast<std::ofstream*>(pofs)->close();
delete pofs; delete pofs;
} }
// remove existing type file if something goes wrong to ensure // remove existing type file if something goes wrong to ensure
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment