From: André Pönitz Date: Sat, 1 Dec 2007 00:12:03 +0000 (+0000) Subject: cosmetics X-Git-Tag: 1.6.10~7105 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=49d3f19860537447579978fc094d8bfba1798267;p=lyx.git cosmetics git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21892 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Text2.cpp b/src/Text2.cpp index c2f6a3f16a..d03d71d107 100644 --- a/src/Text2.cpp +++ b/src/Text2.cpp @@ -43,8 +43,6 @@ #include "paragraph_funcs.h" #include "ParagraphParameters.h" #include "ParIterator.h" -#include "Server.h" -#include "ServerSocket.h" #include "TextClass.h" #include "TextMetrics.h" #include "VSpace.h" diff --git a/src/support/rename.cpp b/src/support/rename.cpp index 96ea85fc89..9a18e58a2d 100644 --- a/src/support/rename.cpp +++ b/src/support/rename.cpp @@ -19,19 +19,14 @@ namespace lyx { namespace support { - -using std::string; - - bool rename(FileName const & from, FileName const & to) { - if (::rename(from.toFilesystemEncoding().c_str(), to.toFilesystemEncoding().c_str()) == -1) { - if (copy(from, to)) { - from.removeFile(); - return true; - } + if (::rename(from.toFilesystemEncoding().c_str(), + to.toFilesystemEncoding().c_str()) != -1) + return true; + if (!copy(from, to)) return false; - } + from.removeFile(); return true; }