summaryrefslogtreecommitdiffstats
path: root/external/libmwaw/0001-fix-build-with-msvc.patch.1
blob: 95b5e0cbeb0b191c124f788a63963cb13cfbfdb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From 01495bf788fe32723f222599e34ba1779ca3d594 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Fri, 24 Jun 2016 14:01:14 +0200
Subject: [PATCH] fix build with msvc

---
 src/lib/CricketDrawParser.cxx | 4 ++--
 src/lib/FreeHandParser.cxx    | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/CricketDrawParser.cxx b/src/lib/CricketDrawParser.cxx
index f04be91..9fe5a32 100644
--- a/src/lib/CricketDrawParser.cxx
+++ b/src/lib/CricketDrawParser.cxx
@@ -930,12 +930,12 @@ bool CricketDrawParser::readShape()
         MWAWBox2f box(shape.m_vertices[0], shape.m_vertices[2]);
         int angle[2] = { shape.m_angles[0], shape.m_angles[1] };
         if (box.min()[1]>box.max()[1]) {
-          std::swap<float>(box.min()[1],box.max()[1]);
+          std::swap(box.min()[1],box.max()[1]);
           angle[0]=180-shape.m_angles[1];
           angle[1]=180-shape.m_angles[0];
         }
         if (angle[1]<=angle[0])
-          std::swap<int>(angle[0],angle[1]);
+          std::swap(angle[0],angle[1]);
         if (angle[1]>360) {
           int numLoop=int(angle[1]/360)-1;
           angle[0]-=numLoop*360;
diff --git a/src/lib/FreeHandParser.cxx b/src/lib/FreeHandParser.cxx
index 78d8b08..e97e6e3 100644
--- a/src/lib/FreeHandParser.cxx
+++ b/src/lib/FreeHandParser.cxx
@@ -999,7 +999,7 @@ bool FreeHandParser::checkHeader(MWAWHeader *header, bool strict)
         getPageSpan().setFormOrientation(MWAWPageSpan::LANDSCAPE);
         for (int j=0; j<4; ++j) {
           if (j==1) continue;
-          std::swap<float>(dim[2*j],dim[2*j+1]);
+          std::swap(dim[2*j],dim[2*j+1]);
         }
         val &= 0xFFDF;
       }
@@ -1016,7 +1016,7 @@ bool FreeHandParser::checkHeader(MWAWHeader *header, bool strict)
           f << "landscape,";
           getPageSpan().setFormOrientation(MWAWPageSpan::LANDSCAPE);
           for (int j=0; j<4; ++j)
-            std::swap<float>(dim[2*j],dim[2*j+1]);
+            std::swap(dim[2*j],dim[2*j+1]);
         }
         if (val&2) f << "crop[mark],";
         if (val&4) f << "center[mark],";
-- 
2.7.4