]> git.lyx.org Git - features.git/commitdiff
cosmetics
authorAndré Pönitz <poenitz@gmx.net>
Sat, 1 Dec 2007 00:12:03 +0000 (00:12 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Sat, 1 Dec 2007 00:12:03 +0000 (00:12 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21892 a592a061-630c-0410-9148-cb99ea01b6c8

src/Text2.cpp
src/support/rename.cpp

index c2f6a3f16a63bed92913114ea7dc07f328e84276..d03d71d1073b198f4804aaeec066f3c5381a17da 100644 (file)
@@ -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"
index 96ea85fc89863990b0f7f8dbbf644a8b54ea375f..9a18e58a2dfed3230a29ee215dd90e9ca6ee310b 100644 (file)
 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;
 }