From 38fb914eb3aced01da1c1ca278e5da766d340c21 Mon Sep 17 00:00:00 2001 From: keescook Date: Fri, 25 Jan 2008 01:47:22 +0000 Subject: [PATCH] first set of updates to headers for clean gcc 4.3 builds --- src/dialogs/object-attributes.cpp | 3 +++ src/display/curve.cpp | 2 +- src/event-context.cpp | 1 + src/helper-fns.h | 2 ++ src/libnr/n-art-bpath.h | 2 ++ src/libnr/nr-pixops.h | 4 ++-- src/message-stack.cpp | 1 + src/pedro/pedroconfig.cpp | 2 ++ src/pedro/pedroxmpp.cpp | 1 + src/selcue.cpp | 2 ++ src/shape-editor.cpp | 1 + src/sp-fecolormatrix.cpp | 2 ++ src/sp-fecomponenttransfer.cpp | 2 ++ src/sp-feconvolvematrix.cpp | 2 ++ src/sp-femorphology.cpp | 2 ++ src/sp-filter-primitive.cpp | 2 ++ src/sp-use-reference.cpp | 2 ++ src/streams-gzip.cpp | 2 ++ src/streams-zlib.cpp | 1 + src/svg/svg.h | 1 + src/verbs.h | 1 + 21 files changed, 35 insertions(+), 3 deletions(-) diff --git a/src/dialogs/object-attributes.cpp b/src/dialogs/object-attributes.cpp index ee355a774..f23e986b1 100644 --- a/src/dialogs/object-attributes.cpp +++ b/src/dialogs/object-attributes.cpp @@ -15,7 +15,10 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + +#include #include + #include "helper/window.h" #include "macros.h" #include "sp-anchor.h" diff --git a/src/display/curve.cpp b/src/display/curve.cpp index bcf5e92a0..01148c44c 100644 --- a/src/display/curve.cpp +++ b/src/display/curve.cpp @@ -15,7 +15,7 @@ * Released under GNU GPL */ - +#include #include #include #include diff --git a/src/event-context.cpp b/src/event-context.cpp index 25abe965b..146237346 100644 --- a/src/event-context.cpp +++ b/src/event-context.cpp @@ -27,6 +27,7 @@ # include "config.h" #endif +#include #include #include #include diff --git a/src/helper-fns.h b/src/helper-fns.h index a4ce8e3b5..b1a1e37f0 100644 --- a/src/helper-fns.h +++ b/src/helper-fns.h @@ -13,6 +13,8 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#include + #include // calling helperfns_read_number(string, false), it's not obvious, what diff --git a/src/libnr/n-art-bpath.h b/src/libnr/n-art-bpath.h index abce499e0..0f0f690fc 100644 --- a/src/libnr/n-art-bpath.h +++ b/src/libnr/n-art-bpath.h @@ -5,6 +5,8 @@ * NArtBpath: old-style path segment. */ +#include + #include "libnr/nr-point.h" #include "libnr/nr-path-code.h" diff --git a/src/libnr/nr-pixops.h b/src/libnr/nr-pixops.h index 2c41f8dbf..417e5e2c9 100644 --- a/src/libnr/nr-pixops.h +++ b/src/libnr/nr-pixops.h @@ -19,8 +19,8 @@ // FAST_DIVIDE assumes that 0<=num<=256*denom // (this covers the case that num=255*denom+denom/2, which is used by DIV_ROUND) template static inline unsigned int FAST_DIVIDE(unsigned int v) { return v/divisor; } -template<> static inline unsigned int FAST_DIVIDE<255>(unsigned int v) { return ((v+1)*0x101) >> 16; } -template<> static inline unsigned int FAST_DIVIDE<255*255>(unsigned int v) { v=(v+1)<<1; v=v+(v>>7)+((v*0x3)>>16)+(v>>22); return (v>>16)>>1; } +template<> inline unsigned int FAST_DIVIDE<255>(unsigned int v) { return ((v+1)*0x101) >> 16; } +template<> inline unsigned int FAST_DIVIDE<255*255>(unsigned int v) { v=(v+1)<<1; v=v+(v>>7)+((v*0x3)>>16)+(v>>22); return (v>>16)>>1; } // FAST_DIV_ROUND assumes that 0<=num<=255*denom (DIV_ROUND should work upto num=2^32-1-(denom/2), // but FAST_DIVIDE_BY_255 already fails at num=65790=258*255, which is not too far above 255.5*255) template static inline unsigned int FAST_DIV_ROUND(unsigned int v) { return FAST_DIVIDE(v+(divisor)/2); } diff --git a/src/message-stack.cpp b/src/message-stack.cpp index d6967fbf8..33a23e7f3 100644 --- a/src/message-stack.cpp +++ b/src/message-stack.cpp @@ -9,6 +9,7 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#include #include #include "message-stack.h" diff --git a/src/pedro/pedroconfig.cpp b/src/pedro/pedroconfig.cpp index fdade21d7..08b9cd17b 100644 --- a/src/pedro/pedroconfig.cpp +++ b/src/pedro/pedroconfig.cpp @@ -49,6 +49,8 @@ We are expecting an xml file with this format: #include "pedrodom.h" #include +#include +#include namespace Pedro { diff --git a/src/pedro/pedroxmpp.cpp b/src/pedro/pedroxmpp.cpp index 1dc1d7ced..bed99004f 100644 --- a/src/pedro/pedroxmpp.cpp +++ b/src/pedro/pedroxmpp.cpp @@ -24,6 +24,7 @@ #include #include +#include #include diff --git a/src/selcue.cpp b/src/selcue.cpp index 3bac1713c..4eba1f756 100644 --- a/src/selcue.cpp +++ b/src/selcue.cpp @@ -12,6 +12,8 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#include + #include "desktop-handles.h" #include "selection.h" #include "display/sp-canvas-util.h" diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp index a2a9a86eb..0f630ac50 100644 --- a/src/shape-editor.cpp +++ b/src/shape-editor.cpp @@ -12,6 +12,7 @@ #include "config.h" #endif +#include #include #include "sp-object.h" diff --git a/src/sp-fecolormatrix.cpp b/src/sp-fecolormatrix.cpp index 60d312db1..4f4ca5f37 100644 --- a/src/sp-fecolormatrix.cpp +++ b/src/sp-fecolormatrix.cpp @@ -19,6 +19,8 @@ # include "config.h" #endif +#include + #include "attributes.h" #include "svg/svg.h" #include "sp-fecolormatrix.h" diff --git a/src/sp-fecomponenttransfer.cpp b/src/sp-fecomponenttransfer.cpp index bb51f55be..f9ecaa47c 100644 --- a/src/sp-fecomponenttransfer.cpp +++ b/src/sp-fecomponenttransfer.cpp @@ -17,6 +17,8 @@ # include "config.h" #endif +#include + #include "attributes.h" #include "svg/svg.h" #include "sp-fecomponenttransfer.h" diff --git a/src/sp-feconvolvematrix.cpp b/src/sp-feconvolvematrix.cpp index a00a009cb..b50d84975 100644 --- a/src/sp-feconvolvematrix.cpp +++ b/src/sp-feconvolvematrix.cpp @@ -18,6 +18,8 @@ # include "config.h" #endif +#include + #include #include "attributes.h" #include "svg/svg.h" diff --git a/src/sp-femorphology.cpp b/src/sp-femorphology.cpp index 77d76f7dc..fa7a3ddb0 100644 --- a/src/sp-femorphology.cpp +++ b/src/sp-femorphology.cpp @@ -18,6 +18,8 @@ # include "config.h" #endif +#include + #include "attributes.h" #include "svg/svg.h" #include "sp-femorphology.h" diff --git a/src/sp-filter-primitive.cpp b/src/sp-filter-primitive.cpp index e8b7593f0..39661788e 100644 --- a/src/sp-filter-primitive.cpp +++ b/src/sp-filter-primitive.cpp @@ -18,6 +18,8 @@ # include "config.h" #endif +#include + #include "attributes.h" #include "sp-filter-primitive.h" #include "xml/repr.h" diff --git a/src/sp-use-reference.cpp b/src/sp-use-reference.cpp index b8c724558..c7923504a 100644 --- a/src/sp-use-reference.cpp +++ b/src/sp-use-reference.cpp @@ -7,6 +7,8 @@ * Released under GNU GPL, read the file 'COPYING' for more information. */ +#include + #include "enums.h" #include "sp-use-reference.h" diff --git a/src/streams-gzip.cpp b/src/streams-gzip.cpp index 4233be7c0..9cd107770 100644 --- a/src/streams-gzip.cpp +++ b/src/streams-gzip.cpp @@ -9,6 +9,8 @@ * Released under GNU LGPL, read the file 'COPYING.LIB' for more information */ +#include + #include "streams-gzip.h" namespace Inkscape { diff --git a/src/streams-zlib.cpp b/src/streams-zlib.cpp index 9e139e301..60953ad5f 100644 --- a/src/streams-zlib.cpp +++ b/src/streams-zlib.cpp @@ -9,6 +9,7 @@ * Released under GNU LGPL, read the file 'COPYING.LIB' for more information */ +#include #include #include "streams-zlib.h" diff --git a/src/svg/svg.h b/src/svg/svg.h index 60b44f8e8..1881fb4a0 100644 --- a/src/svg/svg.h +++ b/src/svg/svg.h @@ -14,6 +14,7 @@ #include #include "svg/svg-length.h" #include +#include struct NArtBpath; struct NRMatrix; diff --git a/src/verbs.h b/src/verbs.h index 104d4db0d..2d0d3d0b6 100644 --- a/src/verbs.h +++ b/src/verbs.h @@ -16,6 +16,7 @@ * This code is GPL if done by Ted or David */ +#include #include "require-config.h" /* HAVE_GTK_WINDOW_FULLSCREEN */ #include "helper/helper-forward.h" #include "forward.h" -- 2.30.2