diff --git a/src/App/Application.cpp b/src/App/Application.cpp index 583b5537e6..2557a45a43 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -1823,11 +1823,11 @@ void printBacktrace(size_t skip=0) std::stringstream str; if (status == 0) { void* offset = (void*)((char*)callstack[i] - (char*)info.dli_saddr); - str << "#" << (i-skip) << " " << callstack[i] << " in " << demangled << " from " << info.dli_fname << "+" << offset << std::endl; + str << "#" << (i-skip) << " " << callstack[i] << " in " << demangled << " from " << info.dli_fname << "+" << offset << '\n'; free(demangled); } else { - str << "#" << (i-skip) << " " << symbols[i] << std::endl; + str << "#" << (i-skip) << " " << symbols[i] << '\n'; } // cannot directly print to cerr when using --write-log @@ -1856,19 +1856,19 @@ void segmentation_fault_handler(int sig) #else switch (sig) { case SIGSEGV: - std::cerr << "Illegal storage access..." << std::endl; + std::cerr << "Illegal storage access..." << '\n'; #if !defined(_DEBUG) throw Base::AccessViolation("Illegal storage access! Please save your work under a new file name and restart the application!"); #endif break; case SIGABRT: - std::cerr << "Abnormal program termination..." << std::endl; + std::cerr << "Abnormal program termination..." << '\n'; #if !defined(_DEBUG) throw Base::AbnormalProgramTermination("Break signal occurred"); #endif break; default: - std::cerr << "Unknown error occurred..." << std::endl; + std::cerr << "Unknown error occurred..." << '\n'; break; } #endif // FC_OS_LINUX @@ -1876,12 +1876,12 @@ void segmentation_fault_handler(int sig) void unhandled_exception_handler() { - std::cerr << "Terminating..." << std::endl; + std::cerr << "Terminating..." << '\n'; } void unexpection_error_handler() { - std::cerr << "Unexpected error occurred..." << std::endl; + std::cerr << "Unexpected error occurred..." << '\n'; // try to throw an exception and give the user chance to save their work #if !defined(_DEBUG) throw Base::AbnormalProgramTermination("Unexpected error occurred! Please save your work under a new file name and restart the application!"); @@ -2340,21 +2340,21 @@ void parseProgramOptions(int ac, char ** av, const string& exe, variables_map& v } catch (const std::exception& e) { std::stringstream str; - str << e.what() << endl << endl << visible << endl; + str << e.what() << '\n' << '\n' << visible << '\n'; throw Base::UnknownProgramOption(str.str()); } catch (...) { std::stringstream str; - str << "Wrong or unknown option, bailing out!" << endl << endl << visible << endl; + str << "Wrong or unknown option, bailing out!" << '\n' << '\n' << visible << '\n'; throw Base::UnknownProgramOption(str.str()); } if (vm.count("help")) { std::stringstream str; - str << exe << endl << endl; - str << "For a detailed description see https://www.freecad.org/wiki/Start_up_and_Configuration" << endl<() << "'" << endl; + << vm["response-file"].as() << "'" << '\n'; throw Base::UnknownProgramOption(str.str()); } // Read the whole file into a string @@ -2387,7 +2387,7 @@ void processProgramOptions(const variables_map& vm, std::mapsecond; } - str << std::endl; + str << '\n'; throw Base::ProgramInformation(str.str()); }