From 28f9b6f3610734b541eee7b8deb7a3ddbdef2d5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fridrich=20=C5=A0trba?= Date: Wed, 13 Mar 2013 14:58:39 +0100 Subject: [PATCH] Trying to fix some windows build issues --- src/lib/CWGraph.cxx | 2 ++ src/lib/EDParser.cxx | 2 +- src/lib/HMWKGraph.cxx | 2 ++ src/lib/MSWStruct.cxx | 2 +- src/lib/libmwaw_internal.hxx | 5 +++++ 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/lib/CWGraph.cxx b/src/lib/CWGraph.cxx index 3c141b3..1cfed0f 100644 --- a/src/lib/CWGraph.cxx +++ b/src/lib/CWGraph.cxx @@ -55,6 +55,8 @@ #include "CWGraph.hxx" +#include "libmwaw_internal.hxx" + /** Internal: the structures of a CWGraph */ namespace CWGraphInternal { diff --git a/src/lib/EDParser.cxx b/src/lib/EDParser.cxx index de0c64f..dd926ed 100644 --- a/src/lib/EDParser.cxx +++ b/src/lib/EDParser.cxx @@ -756,7 +756,7 @@ private: bool DeflateStruct::sendDuplicated(int num, int depl) { - ssize_t readPos=ssize_t(m_circQueuePos)+ssize_t(depl); + int64_t readPos=m_circQueuePos+depl; while (readPos < 0) readPos+=0x2000; while (readPos >= 0x2000) readPos-=0x2000; diff --git a/src/lib/HMWKGraph.cxx b/src/lib/HMWKGraph.cxx index 7e1b093..0e61ca9 100644 --- a/src/lib/HMWKGraph.cxx +++ b/src/lib/HMWKGraph.cxx @@ -53,6 +53,8 @@ #include "HMWKGraph.hxx" +#include "libmwaw_internal.hxx" + /** Internal: the structures of a HMWKGraph */ namespace HMWKGraphInternal { diff --git a/src/lib/MSWStruct.cxx b/src/lib/MSWStruct.cxx index 9f250df..099e75b 100644 --- a/src/lib/MSWStruct.cxx +++ b/src/lib/MSWStruct.cxx @@ -1027,7 +1027,7 @@ void Paragraph::insert(Paragraph const ¶, bool insertModif) for (size_t j = 0; j < m_tabs->size(); j++) { if (m_tabs.get()[j].m_position < val-1e-4 || m_tabs.get()[j].m_position > val+1e-4) continue; - m_tabs->erase (m_tabs->begin()+ssize_t(j)); + m_tabs->erase (m_tabs->begin()+j); done = true; break; } diff --git a/src/lib/libmwaw_internal.hxx b/src/lib/libmwaw_internal.hxx index 8d5db57..437f90f 100644 --- a/src/lib/libmwaw_internal.hxx +++ b/src/lib/libmwaw_internal.hxx @@ -41,8 +41,13 @@ #include #include #include +#include #include +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + #include #include -- 1.8.1.4