[LyX/master] Revert da8b5de97 because of MSVC 2017.

Pavel Sanda sanda at lyx.org
Sat Oct 24 09:39:53 UTC 2020


commit 8af747c9d9f4d5f496313256e044e8a5b99147f4
Author: Pavel Sanda <sanda at lyx.org>
Date:   Sat Oct 24 12:06:17 2020 +0200

    Revert da8b5de97 because of MSVC 2017.
    
    In GCC `min` is defined via including <vector>.
---
 src/DocIterator.h                   |    1 +
 src/Paragraph.cpp                   |    1 -
 src/frontends/qt/FindAndReplace.cpp |    2 --
 src/frontends/qt/GuiBox.cpp         |    2 --
 src/frontends/qt/GuiCharacter.cpp   |    2 --
 src/frontends/qt/GuiDocument.cpp    |    1 -
 src/frontends/qt/GuiRef.cpp         |    2 --
 src/xml.cpp                         |    1 -
 8 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/src/DocIterator.h b/src/DocIterator.h
index a3786c4..344445b 100644
--- a/src/DocIterator.h
+++ b/src/DocIterator.h
@@ -15,6 +15,7 @@
 #include "CursorSlice.h"
 
 #include <vector>
+#include <algorithm> // std::min in MSVC 2017
 
 namespace lyx {
 
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 98e0514..6578e2a 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -61,7 +61,6 @@
 #include "support/lstrings.h"
 #include "support/textutils.h"
 
-#include <algorithm>
 #include <atomic>
 #include <sstream>
 #include <vector>
diff --git a/src/frontends/qt/FindAndReplace.cpp b/src/frontends/qt/FindAndReplace.cpp
index 4d14bcf..af2bbbb 100644
--- a/src/frontends/qt/FindAndReplace.cpp
+++ b/src/frontends/qt/FindAndReplace.cpp
@@ -44,8 +44,6 @@
 #include <QLineEdit>
 #include <QMenu>
 
-#include <algorithm>
-
 using namespace std;
 using namespace lyx::support;
 
diff --git a/src/frontends/qt/GuiBox.cpp b/src/frontends/qt/GuiBox.cpp
index a722ed3..298009d 100644
--- a/src/frontends/qt/GuiBox.cpp
+++ b/src/frontends/qt/GuiBox.cpp
@@ -32,8 +32,6 @@
 #include <QLineEdit>
 #include <QPushButton>
 
-#include <algorithm>
-
 #ifdef IN
 #undef IN
 #endif
diff --git a/src/frontends/qt/GuiCharacter.cpp b/src/frontends/qt/GuiCharacter.cpp
index 96e8d73..cfa481c 100644
--- a/src/frontends/qt/GuiCharacter.cpp
+++ b/src/frontends/qt/GuiCharacter.cpp
@@ -40,8 +40,6 @@
 #include <QSettings>
 #include <QVariant>
 
-#include <algorithm>
-
 using namespace std;
 
 namespace lyx {
diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp
index d691cc7..7e1ec24 100644
--- a/src/frontends/qt/GuiDocument.cpp
+++ b/src/frontends/qt/GuiDocument.cpp
@@ -82,7 +82,6 @@
 #include <QTextBoundaryFinder>
 #include <QTextCursor>
 
-#include <algorithm>
 #include <sstream>
 #include <vector>
 
diff --git a/src/frontends/qt/GuiRef.cpp b/src/frontends/qt/GuiRef.cpp
index b0aaba6..83be347 100644
--- a/src/frontends/qt/GuiRef.cpp
+++ b/src/frontends/qt/GuiRef.cpp
@@ -40,8 +40,6 @@
 #include <QCloseEvent>
 #include <QHeaderView>
 
-#include <algorithm>
-
 using namespace std;
 using namespace lyx::support;
 
diff --git a/src/xml.cpp b/src/xml.cpp
index e50e559..dda39a4 100644
--- a/src/xml.cpp
+++ b/src/xml.cpp
@@ -28,7 +28,6 @@
 #include "support/lstrings.h"
 #include "support/textutils.h"
 
-#include <algorithm>
 #include <atomic>
 #include <map>
 #include <functional>


More information about the lyx-cvs mailing list