From 49d3f19860537447579978fc094d8bfba1798267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Sat, 1 Dec 2007 00:12:03 +0000 Subject: [PATCH] cosmetics git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21892 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Text2.cpp | 2 -- src/support/rename.cpp | 15 +++++---------- 2 files changed, 5 insertions(+), 12 deletions(-) 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; }