diff options
| author | Markus Engel <markus.engel@tum.de> | 2013-09-14 20:43:15 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2013-09-14 20:43:15 +0000 |
| commit | bb4246887ab6a0833cc4d2263b31f951ce314061 (patch) | |
| tree | f5621a11fa7d21ff20b301de9daf047551d38cfb /src | |
| parent | Merged from trunk (r12517). (diff) | |
| download | inkscape-bb4246887ab6a0833cc4d2263b31f951ce314061.tar.gz inkscape-bb4246887ab6a0833cc4d2263b31f951ce314061.zip | |
Modified SP_IS_ macros.
(bzr r11608.1.122)
Diffstat (limited to 'src')
99 files changed, 111 insertions, 111 deletions
diff --git a/src/arc-context.h b/src/arc-context.h index 2fe6eff1e..ec2dbb2bb 100644 --- a/src/arc-context.h +++ b/src/arc-context.h @@ -24,7 +24,7 @@ #include "sp-ellipse.h" #define SP_ARC_CONTEXT(obj) ((SPArcContext*)obj) -#define SP_IS_ARC_CONTEXT(obj) (dynamic_cast<const SPArcContext*>(const SPEventContext*(obj))) +#define SP_IS_ARC_CONTEXT(obj) (dynamic_cast<const SPArcContext*>(const SPEventContext*(obj)) != NULL) class SPArcContext : public SPEventContext { public: diff --git a/src/box3d-context.h b/src/box3d-context.h index 164e3bde8..308acba3d 100644 --- a/src/box3d-context.h +++ b/src/box3d-context.h @@ -24,7 +24,7 @@ #include "box3d.h" #define SP_BOX3D_CONTEXT(obj) ((Box3DContext*)obj) -#define SP_IS_BOX3D_CONTEXT(obj) (dynamic_cast<const Box3DContext*>((const SPEventContext*)obj)) +#define SP_IS_BOX3D_CONTEXT(obj) (dynamic_cast<const Box3DContext*>((const SPEventContext*)obj) != NULL) class Box3DContext : public SPEventContext { public: diff --git a/src/box3d-side.h b/src/box3d-side.h index fcd7eb08c..7306a1b44 100644 --- a/src/box3d-side.h +++ b/src/box3d-side.h @@ -18,7 +18,7 @@ #define SP_BOX3D_SIDE(obj) ((Box3DSide*)obj) -#define SP_IS_BOX3D_SIDE(obj) (dynamic_cast<const Box3DSide*>((SPObject*)obj)) +#define SP_IS_BOX3D_SIDE(obj) (dynamic_cast<const Box3DSide*>((SPObject*)obj) != NULL) class SPBox3D; class Persp3D; diff --git a/src/box3d.h b/src/box3d.h index 53fd1852b..6df746c73 100644 --- a/src/box3d.h +++ b/src/box3d.h @@ -22,7 +22,7 @@ #define SP_TYPE_BOX3D (box3d_get_type ()) #define SP_BOX3D(obj) ((SPBox3D*)obj) -#define SP_IS_BOX3D(obj) (dynamic_cast<const SPBox3D*>((SPObject*)obj)) +#define SP_IS_BOX3D(obj) (dynamic_cast<const SPBox3D*>((SPObject*)obj) != NULL) class Persp3D; class Persp3DReference; diff --git a/src/connector-context.h b/src/connector-context.h index 3e8c89f14..9b76fa5cd 100644 --- a/src/connector-context.h +++ b/src/connector-context.h @@ -21,7 +21,7 @@ #include <glibmm/i18n.h> #define SP_CONNECTOR_CONTEXT(obj) ((SPConnectorContext*)obj) -//#define SP_IS_CONNECTOR_CONTEXT(obj) (dynamic_cast<const SPConnectorContext*>((const SPEventContext*)obj)) +//#define SP_IS_CONNECTOR_CONTEXT(obj) (dynamic_cast<const SPConnectorContext*>((const SPEventContext*)obj) != NULL) struct SPKnot; class SPCurve; diff --git a/src/draw-context.h b/src/draw-context.h index be3d08637..a9ad5c118 100644 --- a/src/draw-context.h +++ b/src/draw-context.h @@ -23,7 +23,7 @@ /* Freehand context */ #define SP_DRAW_CONTEXT(obj) ((SPDrawContext*)obj) -#define SP_IS_DRAW_CONTEXT(obj) (dynamic_cast<const SPDrawContext*>((const SPEventContext*)obj)) +#define SP_IS_DRAW_CONTEXT(obj) (dynamic_cast<const SPDrawContext*>((const SPEventContext*)obj) != NULL) struct SPDrawAnchor; namespace Inkscape diff --git a/src/dropper-context.h b/src/dropper-context.h index 4007c391f..9c727902a 100644 --- a/src/dropper-context.h +++ b/src/dropper-context.h @@ -15,7 +15,7 @@ #include "event-context.h" #define SP_DROPPER_CONTEXT(obj) ((SPDropperContext*)obj) -#define SP_IS_DROPPER_CONTEXT(obj) (dynamic_cast<const SPDropperContext*>((const SPEventContext*)obj)) +#define SP_IS_DROPPER_CONTEXT(obj) (dynamic_cast<const SPDropperContext*>((const SPEventContext*)obj) != NULL) enum { SP_DROPPER_PICK_VISIBLE, diff --git a/src/event-context.h b/src/event-context.h index c2c9b023d..951d97160 100644 --- a/src/event-context.h +++ b/src/event-context.h @@ -34,7 +34,7 @@ namespace Inkscape { } #define SP_EVENT_CONTEXT(obj) ((SPEventContext*)obj) -#define SP_IS_EVENT_CONTEXT(obj) (dynamic_cast<const SPEventContext*>((const SPEventContext*)obj)) +#define SP_IS_EVENT_CONTEXT(obj) (dynamic_cast<const SPEventContext*>((const SPEventContext*)obj) != NULL) gboolean sp_event_context_snap_watchdog_callback(gpointer data); void sp_event_context_discard_delayed_snap_event(SPEventContext *ec); diff --git a/src/filters/blend.h b/src/filters/blend.h index f8b7bd2cb..779eed3e0 100644 --- a/src/filters/blend.h +++ b/src/filters/blend.h @@ -17,7 +17,7 @@ #include "display/nr-filter-blend.h" #define SP_FEBLEND(obj) ((SPFeBlend*)obj) -#define SP_IS_FEBLEND(obj) (dynamic_cast<const SPFeBlend*>((SPObject*)obj)) +#define SP_IS_FEBLEND(obj) (dynamic_cast<const SPFeBlend*>((SPObject*)obj) != NULL) class SPFeBlend : public SPFilterPrimitive { public: diff --git a/src/filters/colormatrix.h b/src/filters/colormatrix.h index 4d11964dd..e109bbcdd 100644 --- a/src/filters/colormatrix.h +++ b/src/filters/colormatrix.h @@ -16,7 +16,7 @@ #include "display/nr-filter-colormatrix.h" #define SP_FECOLORMATRIX(obj) ((SPFeColorMatrix*)obj) -#define SP_IS_FECOLORMATRIX(obj) (dynamic_cast<const SPFeColorMatrix*>((SPObject*)obj)) +#define SP_IS_FECOLORMATRIX(obj) (dynamic_cast<const SPFeColorMatrix*>((SPObject*)obj) != NULL) class SPFeColorMatrix : public SPFilterPrimitive { public: diff --git a/src/filters/componenttransfer-funcnode.h b/src/filters/componenttransfer-funcnode.h index 873baa196..10eead379 100644 --- a/src/filters/componenttransfer-funcnode.h +++ b/src/filters/componenttransfer-funcnode.h @@ -36,10 +36,10 @@ //#define SP_IS_FEFUNCB(obj) (obj != NULL && static_cast<const SPObject*>(obj)->typeHierarchy.count(typeid(SPFeFuncNode))) //#define SP_IS_FEFUNCA(obj) (obj != NULL && static_cast<const SPObject*>(obj)->typeHierarchy.count(typeid(SPFeFuncNode))) -#define SP_IS_FEFUNCR(obj) (dynamic_cast<const SPFeFuncNode*>((SPObject*)obj)) -#define SP_IS_FEFUNCG(obj) (dynamic_cast<const SPFeFuncNode*>((SPObject*)obj)) -#define SP_IS_FEFUNCB(obj) (dynamic_cast<const SPFeFuncNode*>((SPObject*)obj)) -#define SP_IS_FEFUNCA(obj) (dynamic_cast<const SPFeFuncNode*>((SPObject*)obj)) +#define SP_IS_FEFUNCR(obj) (dynamic_cast<const SPFeFuncNode*>((SPObject*)obj) != NULL) +#define SP_IS_FEFUNCG(obj) (dynamic_cast<const SPFeFuncNode*>((SPObject*)obj) != NULL) +#define SP_IS_FEFUNCB(obj) (dynamic_cast<const SPFeFuncNode*>((SPObject*)obj) != NULL) +#define SP_IS_FEFUNCA(obj) (dynamic_cast<const SPFeFuncNode*>((SPObject*)obj) != NULL) class SPFeFuncNode : public SPObject { public: diff --git a/src/filters/componenttransfer.h b/src/filters/componenttransfer.h index 3aab5cf49..14149171c 100644 --- a/src/filters/componenttransfer.h +++ b/src/filters/componenttransfer.h @@ -14,7 +14,7 @@ #include "sp-filter-primitive.h" #define SP_FECOMPONENTTRANSFER(obj) ((SPFeComponentTransfer*)obj) -#define SP_IS_FECOMPONENTTRANSFER(obj) (dynamic_cast<const SPFeComponentTransfer*>((SPObject*)obj)) +#define SP_IS_FECOMPONENTTRANSFER(obj) (dynamic_cast<const SPFeComponentTransfer*>((SPObject*)obj) != NULL) namespace Inkscape { namespace Filters { diff --git a/src/filters/composite.h b/src/filters/composite.h index dc124e891..b3500ecaf 100644 --- a/src/filters/composite.h +++ b/src/filters/composite.h @@ -14,7 +14,7 @@ #include "sp-filter-primitive.h" #define SP_FECOMPOSITE(obj) ((SPFeComposite*)obj) -#define SP_IS_FECOMPOSITE(obj) (dynamic_cast<const SPFeComposite*>((SPObject*)obj)) +#define SP_IS_FECOMPOSITE(obj) (dynamic_cast<const SPFeComposite*>((SPObject*)obj) != NULL) enum FeCompositeOperator { // Default value is 'over', but let's distinquish specifying the diff --git a/src/filters/convolvematrix.h b/src/filters/convolvematrix.h index abcf52384..6cbd63998 100644 --- a/src/filters/convolvematrix.h +++ b/src/filters/convolvematrix.h @@ -19,7 +19,7 @@ #include "display/nr-filter-convolve-matrix.h" #define SP_FECONVOLVEMATRIX(obj) ((SPFeConvolveMatrix*)obj) -#define SP_IS_FECONVOLVEMATRIX(obj) (dynamic_cast<const SPFeConvolveMatrix*>((SPObject*)obj)) +#define SP_IS_FECONVOLVEMATRIX(obj) (dynamic_cast<const SPFeConvolveMatrix*>((SPObject*)obj) != NULL) class SPFeConvolveMatrix : public SPFilterPrimitive { public: diff --git a/src/filters/diffuselighting.h b/src/filters/diffuselighting.h index e33584b4f..701128158 100644 --- a/src/filters/diffuselighting.h +++ b/src/filters/diffuselighting.h @@ -16,7 +16,7 @@ #include "number-opt-number.h" #define SP_FEDIFFUSELIGHTING(obj) ((SPFeDiffuseLighting*)obj) -#define SP_IS_FEDIFFUSELIGHTING(obj) (dynamic_cast<const SPFeDiffuseLighting*>((SPObject*)obj)) +#define SP_IS_FEDIFFUSELIGHTING(obj) (dynamic_cast<const SPFeDiffuseLighting*>((SPObject*)obj) != NULL) struct SVGICCColor; diff --git a/src/filters/displacementmap.h b/src/filters/displacementmap.h index 3100e66b7..66b0c8afc 100644 --- a/src/filters/displacementmap.h +++ b/src/filters/displacementmap.h @@ -15,7 +15,7 @@ #include "sp-filter-primitive.h" #define SP_FEDISPLACEMENTMAP(obj) ((SPFeDisplacementMap*)obj) -#define SP_IS_FEDISPLACEMENTMAP(obj) (dynamic_cast<const SPFeDisplacementMap*>((SPObject*)obj)) +#define SP_IS_FEDISPLACEMENTMAP(obj) (dynamic_cast<const SPFeDisplacementMap*>((SPObject*)obj) != NULL) enum FilterDisplacementMapChannelSelector { DISPLACEMENTMAP_CHANNEL_RED, diff --git a/src/filters/distantlight.h b/src/filters/distantlight.h index ad9c8f53c..bab49726e 100644 --- a/src/filters/distantlight.h +++ b/src/filters/distantlight.h @@ -18,7 +18,7 @@ #include "sp-object.h" #define SP_FEDISTANTLIGHT(obj) ((SPFeDistantLight*)obj) -#define SP_IS_FEDISTANTLIGHT(obj) (dynamic_cast<const SPFeDistantLight*>((SPObject*)obj)) +#define SP_IS_FEDISTANTLIGHT(obj) (dynamic_cast<const SPFeDistantLight*>((SPObject*)obj) != NULL) /* Distant light class */ class SPFeDistantLight : public SPObject { diff --git a/src/filters/flood.h b/src/filters/flood.h index 67369a794..d052dd8ff 100644 --- a/src/filters/flood.h +++ b/src/filters/flood.h @@ -16,7 +16,7 @@ #include "svg/svg-icc-color.h" #define SP_FEFLOOD(obj) ((SPFeFlood*)obj) -#define SP_IS_FEFLOOD(obj) (dynamic_cast<const SPFeFlood*>((SPObject*)obj)) +#define SP_IS_FEFLOOD(obj) (dynamic_cast<const SPFeFlood*>((SPObject*)obj) != NULL) class SPFeFlood : public SPFilterPrimitive { public: diff --git a/src/filters/gaussian-blur.h b/src/filters/gaussian-blur.h index b0e725a50..7aa293b93 100644 --- a/src/filters/gaussian-blur.h +++ b/src/filters/gaussian-blur.h @@ -16,7 +16,7 @@ #include "number-opt-number.h" #define SP_GAUSSIANBLUR(obj) ((SPGaussianBlur*)obj) -#define SP_IS_GAUSSIANBLUR(obj) (dynamic_cast<const SPGaussianBlur*>((SPObject*)obj)) +#define SP_IS_GAUSSIANBLUR(obj) (dynamic_cast<const SPGaussianBlur*>((SPObject*)obj) != NULL) class SPGaussianBlur : public SPFilterPrimitive { public: diff --git a/src/filters/image.h b/src/filters/image.h index 8bbab2614..055e4e31a 100644 --- a/src/filters/image.h +++ b/src/filters/image.h @@ -19,7 +19,7 @@ #include "uri-references.h" #define SP_FEIMAGE(obj) ((SPFeImage*)obj) -#define SP_IS_FEIMAGE(obj) (dynamic_cast<const SPFeImage*>((SPObject*)obj)) +#define SP_IS_FEIMAGE(obj) (dynamic_cast<const SPFeImage*>((SPObject*)obj) != NULL) class SPFeImage : public SPFilterPrimitive { public: diff --git a/src/filters/merge.h b/src/filters/merge.h index c7d2ce45b..55f0b0be7 100644 --- a/src/filters/merge.h +++ b/src/filters/merge.h @@ -13,7 +13,7 @@ #include "sp-filter-primitive.h" #define SP_FEMERGE(obj) ((SPFeMerge*)obj) -#define SP_IS_FEMERGE(obj) (dynamic_cast<const SPFeMerge*>((SPObject*)obj)) +#define SP_IS_FEMERGE(obj) (dynamic_cast<const SPFeMerge*>((SPObject*)obj) != NULL) class SPFeMerge : public SPFilterPrimitive { public: diff --git a/src/filters/mergenode.h b/src/filters/mergenode.h index 9182780ca..3fd5e890b 100644 --- a/src/filters/mergenode.h +++ b/src/filters/mergenode.h @@ -18,7 +18,7 @@ #include "sp-object.h" #define SP_FEMERGENODE(obj) ((SPFeMergeNode*)obj) -#define SP_IS_FEMERGENODE(obj) (dynamic_cast<const SPFeMergeNode*>((SPObject*)obj)) +#define SP_IS_FEMERGENODE(obj) (dynamic_cast<const SPFeMergeNode*>((SPObject*)obj) != NULL) class SPFeMergeNode : public SPObject { public: diff --git a/src/filters/morphology.h b/src/filters/morphology.h index 786d444f3..ebcdfc28f 100644 --- a/src/filters/morphology.h +++ b/src/filters/morphology.h @@ -17,7 +17,7 @@ #include "display/nr-filter-morphology.h" #define SP_FEMORPHOLOGY(obj) ((SPFeMorphology*)obj) -#define SP_IS_FEMORPHOLOGY(obj) (dynamic_cast<const SPFeMorphology*>((SPObject*)obj)) +#define SP_IS_FEMORPHOLOGY(obj) (dynamic_cast<const SPFeMorphology*>((SPObject*)obj) != NULL) class SPFeMorphology : public SPFilterPrimitive { public: diff --git a/src/filters/offset.h b/src/filters/offset.h index 10bed3338..43407c3a9 100644 --- a/src/filters/offset.h +++ b/src/filters/offset.h @@ -15,7 +15,7 @@ #include "sp-filter-primitive.h" #define SP_FEOFFSET(obj) ((SPFeOffset*)obj) -#define SP_IS_FEOFFSET(obj) (dynamic_cast<const SPFeOffset*>((SPObject*)obj)) +#define SP_IS_FEOFFSET(obj) (dynamic_cast<const SPFeOffset*>((SPObject*)obj) != NULL) class SPFeOffset : public SPFilterPrimitive { public: diff --git a/src/filters/pointlight.h b/src/filters/pointlight.h index 2379167b6..2d092bd1c 100644 --- a/src/filters/pointlight.h +++ b/src/filters/pointlight.h @@ -18,7 +18,7 @@ #include "sp-object.h" #define SP_FEPOINTLIGHT(obj) ((SPFePointLight*)obj) -#define SP_IS_FEPOINTLIGHT(obj) (dynamic_cast<const SPFePointLight*>((SPObject*)obj)) +#define SP_IS_FEPOINTLIGHT(obj) (dynamic_cast<const SPFePointLight*>((SPObject*)obj) != NULL) class SPFePointLight : public SPObject { public: diff --git a/src/filters/specularlighting.h b/src/filters/specularlighting.h index 081d0e0ed..f99dbd9ce 100644 --- a/src/filters/specularlighting.h +++ b/src/filters/specularlighting.h @@ -18,7 +18,7 @@ #include "number-opt-number.h" #define SP_FESPECULARLIGHTING(obj) ((SPFeSpecularLighting*)obj) -#define SP_IS_FESPECULARLIGHTING(obj) (dynamic_cast<const SPFeSpecularLighting*>((SPObject*)obj)) +#define SP_IS_FESPECULARLIGHTING(obj) (dynamic_cast<const SPFeSpecularLighting*>((SPObject*)obj) != NULL) struct SVGICCColor; diff --git a/src/filters/spotlight.h b/src/filters/spotlight.h index b273f72b7..55717ac5d 100644 --- a/src/filters/spotlight.h +++ b/src/filters/spotlight.h @@ -18,7 +18,7 @@ #include "sp-object.h" #define SP_FESPOTLIGHT(obj) ((SPFeSpotLight*)obj) -#define SP_IS_FESPOTLIGHT(obj) (dynamic_cast<const SPFeSpotLight*>((SPObject*)obj)) +#define SP_IS_FESPOTLIGHT(obj) (dynamic_cast<const SPFeSpotLight*>((SPObject*)obj) != NULL) class SPFeSpotLight : public SPObject { public: diff --git a/src/filters/tile.h b/src/filters/tile.h index 184858a3d..9b2199adc 100644 --- a/src/filters/tile.h +++ b/src/filters/tile.h @@ -15,7 +15,7 @@ #include "sp-filter-primitive.h" #define SP_FETILE(obj) ((SPFeTile*)obj) -#define SP_IS_FETILE(obj) (dynamic_cast<const SPFeTile*>((SPObject*)obj)) +#define SP_IS_FETILE(obj) (dynamic_cast<const SPFeTile*>((SPObject*)obj) != NULL) /* FeTile base class */ class SPFeTile : public SPFilterPrimitive { diff --git a/src/filters/turbulence.h b/src/filters/turbulence.h index d6046036a..d0bb6f878 100644 --- a/src/filters/turbulence.h +++ b/src/filters/turbulence.h @@ -18,7 +18,7 @@ #include "display/nr-filter-turbulence.h" #define SP_FETURBULENCE(obj) ((SPFeTurbulence*)obj) -#define SP_IS_FETURBULENCE(obj) (dynamic_cast<const SPFeTurbulence*>((SPObject*)obj)) +#define SP_IS_FETURBULENCE(obj) (dynamic_cast<const SPFeTurbulence*>((SPObject*)obj) != NULL) /* FeTurbulence base class */ diff --git a/src/flood-context.h b/src/flood-context.h index 37d43c4c7..26fc03a3f 100644 --- a/src/flood-context.h +++ b/src/flood-context.h @@ -17,7 +17,7 @@ #include "event-context.h" #define SP_FLOOD_CONTEXT(obj) ((SPFloodContext*)obj) -#define SP_IS_FLOOD_CONTEXT(obj) (dynamic_cast<const SPFloodContext*>((const SPEventContext*)obj)) +#define SP_IS_FLOOD_CONTEXT(obj) (dynamic_cast<const SPFloodContext*>((const SPEventContext*)obj) != NULL) #define FLOOD_COLOR_CHANNEL_R 1 diff --git a/src/gradient-context.h b/src/gradient-context.h index fb964f904..a49ea305a 100644 --- a/src/gradient-context.h +++ b/src/gradient-context.h @@ -20,7 +20,7 @@ #include "event-context.h" #define SP_GRADIENT_CONTEXT(obj) ((SPGradientContext*)obj) -#define SP_IS_GRADIENT_CONTEXT(obj) (dynamic_cast<const SPGradientContext*>((const SPEventContext*)obj)) +#define SP_IS_GRADIENT_CONTEXT(obj) (dynamic_cast<const SPGradientContext*>((const SPEventContext*)obj) != NULL) class SPGradientContext : public SPEventContext { public: diff --git a/src/lpe-tool-context.h b/src/lpe-tool-context.h index 0cfc89ebc..1097b12c8 100644 --- a/src/lpe-tool-context.h +++ b/src/lpe-tool-context.h @@ -18,7 +18,7 @@ #include "pen-context.h" #define SP_LPETOOL_CONTEXT(obj) ((SPLPEToolContext*)obj) -#define SP_IS_LPETOOL_CONTEXT(obj) (dynamic_cast<const SPLPEToolContext*>((const SPEventContext*)obj)) +#define SP_IS_LPETOOL_CONTEXT(obj) (dynamic_cast<const SPLPEToolContext*>((const SPEventContext*)obj) != NULL) /* This is the list of subtools from which the toolbar of the LPETool is built automatically */ extern const int num_subtools; diff --git a/src/marker.h b/src/marker.h index 0300d7199..3da12af08 100644 --- a/src/marker.h +++ b/src/marker.h @@ -20,7 +20,7 @@ #define SP_TYPE_MARKER (sp_marker_get_type ()) #define SP_MARKER(obj) ((SPMarker*)obj) -#define SP_IS_MARKER(obj) (dynamic_cast<const SPMarker*>((SPObject*)obj)) +#define SP_IS_MARKER(obj) (dynamic_cast<const SPMarker*>((SPObject*)obj) != NULL) struct SPMarkerView; diff --git a/src/measure-context.h b/src/measure-context.h index 2449d5735..7dd8a59b4 100644 --- a/src/measure-context.h +++ b/src/measure-context.h @@ -15,7 +15,7 @@ #include "event-context.h" #define SP_MEASURE_CONTEXT(obj) ((SPMeasureContext*)obj) -#define SP_IS_MEASURE_CONTEXT(obj) (dynamic_cast<const SPMeasureContext*>((const SPEventContext*)obj)) +#define SP_IS_MEASURE_CONTEXT(obj) (dynamic_cast<const SPMeasureContext*>((const SPEventContext*)obj) != NULL) class SPMeasureContext : public SPEventContext { public: diff --git a/src/mesh-context.h b/src/mesh-context.h index 1d360268e..384aca0ff 100644 --- a/src/mesh-context.h +++ b/src/mesh-context.h @@ -22,7 +22,7 @@ #include "event-context.h" #define SP_MESH_CONTEXT(obj) ((SPMeshContext*)obj) -#define SP_IS_MESH_CONTEXT(obj) (dynamic_cast<const SPMeshContext*>((const SPEventContext*)obj)) +#define SP_IS_MESH_CONTEXT(obj) (dynamic_cast<const SPMeshContext*>((const SPEventContext*)obj) != NULL) class SPMeshContext : public SPEventContext { public: diff --git a/src/pen-context.h b/src/pen-context.h index 3c83f3b7f..0e318f66b 100644 --- a/src/pen-context.h +++ b/src/pen-context.h @@ -9,7 +9,7 @@ #include "live_effects/effect.h" #define SP_PEN_CONTEXT(obj) ((SPPenContext*)obj) -#define SP_IS_PEN_CONTEXT(obj) (dynamic_cast<const SPPenContext*>((const SPEventContext*)obj)) +#define SP_IS_PEN_CONTEXT(obj) (dynamic_cast<const SPPenContext*>((const SPEventContext*)obj) != NULL) struct SPCtrlLine; diff --git a/src/pencil-context.h b/src/pencil-context.h index a3e7a2ef0..ff13a5ac0 100644 --- a/src/pencil-context.h +++ b/src/pencil-context.h @@ -8,7 +8,7 @@ #include "draw-context.h" #define SP_PENCIL_CONTEXT(obj) ((SPPencilContext*)obj) -#define SP_IS_PENCIL_CONTEXT(obj) (dynamic_cast<const SPPencilContext*>((const SPEventContext*)obj)) +#define SP_IS_PENCIL_CONTEXT(obj) (dynamic_cast<const SPPencilContext*>((const SPEventContext*)obj) != NULL) enum PencilState { SP_PENCIL_CONTEXT_IDLE, diff --git a/src/persp3d.h b/src/persp3d.h index a1e8928f8..450d41d11 100644 --- a/src/persp3d.h +++ b/src/persp3d.h @@ -13,7 +13,7 @@ */ #define SP_PERSP3D(obj) ((Persp3D*)obj) -#define SP_IS_PERSP3D(obj) (dynamic_cast<const Persp3D*>((SPObject*)obj)) +#define SP_IS_PERSP3D(obj) (dynamic_cast<const Persp3D*>((SPObject*)obj) != NULL) #include <list> #include <vector> diff --git a/src/rect-context.h b/src/rect-context.h index f57a1266a..f381fcba2 100644 --- a/src/rect-context.h +++ b/src/rect-context.h @@ -22,7 +22,7 @@ #include "sp-rect.h" #define SP_RECT_CONTEXT(obj) ((SPRectContext*)obj) -#define SP_IS_RECT_CONTEXT(obj) (dynamic_cast<const SPRectContext*>((const SPEventContext*)obj)) +#define SP_IS_RECT_CONTEXT(obj) (dynamic_cast<const SPRectContext*>((const SPEventContext*)obj) != NULL) class SPRectContext : public SPEventContext { public: diff --git a/src/select-context.h b/src/select-context.h index 25b9997e6..3a601aa7a 100644 --- a/src/select-context.h +++ b/src/select-context.h @@ -16,7 +16,7 @@ #include <gtk/gtk.h> #define SP_SELECT_CONTEXT(obj) ((SPSelectContext*)obj) -#define SP_IS_SELECT_CONTEXT(obj) (dynamic_cast<const SPSelectContext*>((const SPEventContext*)obj)) +#define SP_IS_SELECT_CONTEXT(obj) (dynamic_cast<const SPSelectContext*>((const SPEventContext*)obj) != NULL) struct SPCanvasItem; diff --git a/src/sp-anchor.h b/src/sp-anchor.h index b3d95d9c4..e1f7d708a 100644 --- a/src/sp-anchor.h +++ b/src/sp-anchor.h @@ -16,7 +16,7 @@ #include "sp-item-group.h" #define SP_ANCHOR(obj) ((SPAnchor*)obj) -#define SP_IS_ANCHOR(obj) (dynamic_cast<const SPAnchor*>((SPObject*)obj)) +#define SP_IS_ANCHOR(obj) (dynamic_cast<const SPAnchor*>((SPObject*)obj) != NULL) class SPAnchor : public SPGroup { public: diff --git a/src/sp-clippath.h b/src/sp-clippath.h index 707213611..e5b65b1b8 100644 --- a/src/sp-clippath.h +++ b/src/sp-clippath.h @@ -16,7 +16,7 @@ */ #define SP_CLIPPATH(obj) ((SPClipPath*)obj) -#define SP_IS_CLIPPATH(obj) (dynamic_cast<const SPClipPath*>((SPObject*)obj)) +#define SP_IS_CLIPPATH(obj) (dynamic_cast<const SPClipPath*>((SPObject*)obj) != NULL) struct SPClipPathView; diff --git a/src/sp-defs.h b/src/sp-defs.h index 415aa4cd2..dbe0df280 100644 --- a/src/sp-defs.h +++ b/src/sp-defs.h @@ -16,7 +16,7 @@ #include "sp-object.h" #define SP_DEFS(obj) ((SPDefs*)obj) -#define SP_IS_DEFS(obj) (dynamic_cast<const SPDefs*>((SPObject*)obj)) +#define SP_IS_DEFS(obj) (dynamic_cast<const SPDefs*>((SPObject*)obj) != NULL) class SPDefs : public SPObject { public: diff --git a/src/sp-desc.h b/src/sp-desc.h index ac8fc564f..7a89aa7e6 100644 --- a/src/sp-desc.h +++ b/src/sp-desc.h @@ -15,7 +15,7 @@ #include "sp-object.h" #define SP_DESC(obj) ((SPDesc*)obj) -#define SP_IS_DESC(obj) (dynamic_cast<const SPDesc*>((SPObject*)obj)) +#define SP_IS_DESC(obj) (dynamic_cast<const SPDesc*>((SPObject*)obj) != NULL) class SPDesc : public SPObject { public: diff --git a/src/sp-ellipse.h b/src/sp-ellipse.h index 298a7afae..32cf58623 100644 --- a/src/sp-ellipse.h +++ b/src/sp-ellipse.h @@ -19,7 +19,7 @@ /* Common parent class */ #define SP_GENERICELLIPSE(obj) ((SPGenericEllipse*)obj) -#define SP_IS_GENERICELLIPSE(obj) (dynamic_cast<const SPGenericEllipse*>((SPObject*)obj)) +#define SP_IS_GENERICELLIPSE(obj) (dynamic_cast<const SPGenericEllipse*>((SPObject*)obj) != NULL) class SPGenericEllipse : public SPShape { public: @@ -48,7 +48,7 @@ void sp_genericellipse_normalize (SPGenericEllipse *ellipse); /* SVG <ellipse> element */ #define SP_ELLIPSE(obj) ((SPEllipse*)obj) -#define SP_IS_ELLIPSE(obj) (dynamic_cast<const SPEllipse*>((SPObject*)obj)) +#define SP_IS_ELLIPSE(obj) (dynamic_cast<const SPEllipse*>((SPObject*)obj) != NULL) class SPEllipse : public SPGenericEllipse { public: @@ -65,7 +65,7 @@ void sp_ellipse_position_set (SPEllipse * ellipse, gdouble x, gdouble y, gdouble /* SVG <circle> element */ #define SP_CIRCLE(obj) ((SPCircle*)obj) -#define SP_IS_CIRCLE(obj) (dynamic_cast<const SPCircle*>((SPObject*)obj)) +#define SP_IS_CIRCLE(obj) (dynamic_cast<const SPCircle*>((SPObject*)obj) != NULL) class SPCircle : public SPGenericEllipse { public: @@ -80,7 +80,7 @@ public: /* <path sodipodi:type="arc"> element */ #define SP_ARC(obj) ((SPArc*)obj) -#define SP_IS_ARC(obj) (dynamic_cast<const SPArc*>((SPObject*)obj)) +#define SP_IS_ARC(obj) (dynamic_cast<const SPArc*>((SPObject*)obj) != NULL) class SPArc : public SPGenericEllipse { public: diff --git a/src/sp-filter-primitive.h b/src/sp-filter-primitive.h index 1026937ff..e4dda2e06 100644 --- a/src/sp-filter-primitive.h +++ b/src/sp-filter-primitive.h @@ -18,7 +18,7 @@ #include "svg/svg-length.h" #define SP_FILTER_PRIMITIVE(obj) ((SPFilterPrimitive*)obj) -#define SP_IS_FILTER_PRIMITIVE(obj) (dynamic_cast<const SPFilterPrimitive*>((SPObject*)obj)) +#define SP_IS_FILTER_PRIMITIVE(obj) (dynamic_cast<const SPFilterPrimitive*>((SPObject*)obj) != NULL) namespace Inkscape { namespace Filters { diff --git a/src/sp-filter.h b/src/sp-filter.h index e1e56be2c..29f1fb9f2 100644 --- a/src/sp-filter.h +++ b/src/sp-filter.h @@ -22,7 +22,7 @@ #include <glibmm/ustring.h> #define SP_FILTER(obj) ((SPFilter*)obj) -#define SP_IS_FILTER(obj) (dynamic_cast<const SPFilter*>((SPObject*)obj)) +#define SP_IS_FILTER(obj) (dynamic_cast<const SPFilter*>((SPObject*)obj) != NULL) #define SP_FILTER_FILTER_UNITS(f) (SP_FILTER(f)->filterUnits) #define SP_FILTER_PRIMITIVE_UNITS(f) (SP_FILTER(f)->primitiveUnits) diff --git a/src/sp-flowdiv.h b/src/sp-flowdiv.h index 9980dc4da..756d211e9 100644 --- a/src/sp-flowdiv.h +++ b/src/sp-flowdiv.h @@ -8,19 +8,19 @@ #include "sp-item.h" #define SP_FLOWDIV(obj) ((SPFlowdiv*)obj) -#define SP_IS_FLOWDIV(obj) (dynamic_cast<const SPFlowdiv*>((SPObject*)obj)) +#define SP_IS_FLOWDIV(obj) (dynamic_cast<const SPFlowdiv*>((SPObject*)obj) != NULL) #define SP_FLOWTSPAN(obj) ((SPFlowtspan*)obj) -#define SP_IS_FLOWTSPAN(obj) (dynamic_cast<const SPFlowtspan*>((SPObject*)obj)) +#define SP_IS_FLOWTSPAN(obj) (dynamic_cast<const SPFlowtspan*>((SPObject*)obj) != NULL) #define SP_FLOWPARA(obj) ((SPFlowpara*)obj) -#define SP_IS_FLOWPARA(obj) (dynamic_cast<const SPFlowpara*>((SPObject*)obj)) +#define SP_IS_FLOWPARA(obj) (dynamic_cast<const SPFlowpara*>((SPObject*)obj) != NULL) #define SP_FLOWLINE(obj) ((SPFlowline*)obj) -#define SP_IS_FLOWLINE(obj) (dynamic_cast<const SPFlowline*>((SPObject*)obj)) +#define SP_IS_FLOWLINE(obj) (dynamic_cast<const SPFlowline*>((SPObject*)obj) != NULL) #define SP_FLOWREGIONBREAK(obj) ((SPFlowregionbreak*)obj) -#define SP_IS_FLOWREGIONBREAK(obj) (dynamic_cast<const SPFlowregionbreak*>((SPObject*)obj)) +#define SP_IS_FLOWREGIONBREAK(obj) (dynamic_cast<const SPFlowregionbreak*>((SPObject*)obj) != NULL) // these 3 are derivatives of SPItem to get the automatic style handling class SPFlowdiv : public SPItem { diff --git a/src/sp-flowregion.h b/src/sp-flowregion.h index 48d702494..2a17b1309 100644 --- a/src/sp-flowregion.h +++ b/src/sp-flowregion.h @@ -7,10 +7,10 @@ #include "sp-item.h" #define SP_FLOWREGION(obj) ((SPFlowregion*)obj) -#define SP_IS_FLOWREGION(obj) (dynamic_cast<const SPFlowregion*>((SPObject*)obj)) +#define SP_IS_FLOWREGION(obj) (dynamic_cast<const SPFlowregion*>((SPObject*)obj) != NULL) #define SP_FLOWREGIONEXCLUDE(obj) ((SPFlowregionExclude*)obj) -#define SP_IS_FLOWREGIONEXCLUDE(obj) (dynamic_cast<const SPFlowregionExclude*>((SPObject*)obj)) +#define SP_IS_FLOWREGIONEXCLUDE(obj) (dynamic_cast<const SPFlowregionExclude*>((SPObject*)obj) != NULL) class Path; class Shape; diff --git a/src/sp-flowtext.h b/src/sp-flowtext.h index 388d5a4b2..b1e2ccf8f 100644 --- a/src/sp-flowtext.h +++ b/src/sp-flowtext.h @@ -10,7 +10,7 @@ #include "libnrtype/Layout-TNG.h" #define SP_FLOWTEXT(obj) ((SPFlowtext*)obj) -#define SP_IS_FLOWTEXT(obj) (dynamic_cast<const SPFlowtext*>((SPObject*)obj)) +#define SP_IS_FLOWTEXT(obj) (dynamic_cast<const SPFlowtext*>((SPObject*)obj) != NULL) namespace Inkscape { diff --git a/src/sp-font-face.h b/src/sp-font-face.h index b119d1079..c44692871 100644 --- a/src/sp-font-face.h +++ b/src/sp-font-face.h @@ -25,7 +25,7 @@ #include "sp-object.h" #define SP_FONTFACE(obj) ((SPFontFace*)obj) -#define SP_IS_FONTFACE(obj) (dynamic_cast<const SPFontFace*>((SPObject*)obj)) +#define SP_IS_FONTFACE(obj) (dynamic_cast<const SPFontFace*>((SPObject*)obj) != NULL) enum FontFaceStyleType{ SP_FONTFACE_STYLE_ALL, diff --git a/src/sp-font.h b/src/sp-font.h index cbc63b69d..d90ee67f1 100644 --- a/src/sp-font.h +++ b/src/sp-font.h @@ -19,7 +19,7 @@ #include "sp-object.h" #define SP_FONT(obj) ((SPFont*)obj) -#define SP_IS_FONT(obj) (dynamic_cast<const SPFont*>((SPObject*)obj)) +#define SP_IS_FONT(obj) (dynamic_cast<const SPFont*>((SPObject*)obj) != NULL) class SPFont : public SPObject { public: diff --git a/src/sp-glyph-kerning.h b/src/sp-glyph-kerning.h index b579e5e2e..c8cf6a0b6 100644 --- a/src/sp-glyph-kerning.h +++ b/src/sp-glyph-kerning.h @@ -25,7 +25,7 @@ //#define SP_IS_HKERN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_HKERN)) #define SP_HKERN(obj) ((SPHkern*)obj) -#define SP_IS_HKERN(obj) (dynamic_cast<const SPHkern*>((SPObject*)obj)) +#define SP_IS_HKERN(obj) (dynamic_cast<const SPHkern*>((SPObject*)obj) != NULL) //#define SP_VKERN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_VKERN, SPVkern)) //#define SP_VKERN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SP_TYPE_VKERN, SPGlyphKerningClass)) @@ -33,7 +33,7 @@ //#define SP_IS_VKERN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SP_TYPE_VKERN)) #define SP_VKERN(obj) ((SPVkern*)obj) -#define SP_IS_VKERN(obj) (dynamic_cast<const SPVkern*>((SPObject*)obj)) +#define SP_IS_VKERN(obj) (dynamic_cast<const SPVkern*>((SPObject*)obj) != NULL) // CPPIFY: These casting macros are buggy, as Vkern and Hkern aren't "real" classes. diff --git a/src/sp-glyph.h b/src/sp-glyph.h index 79ed256e9..7734efdb0 100644 --- a/src/sp-glyph.h +++ b/src/sp-glyph.h @@ -19,7 +19,7 @@ #include "sp-object.h" #define SP_GLYPH(obj) ((SPGlyph*)obj) -#define SP_IS_GLYPH(obj) (dynamic_cast<const SPGlyph*>((SPObject*)obj)) +#define SP_IS_GLYPH(obj) (dynamic_cast<const SPGlyph*>((SPObject*)obj) != NULL) enum glyphArabicForm { GLYPH_ARABIC_FORM_INITIAL, diff --git a/src/sp-gradient.h b/src/sp-gradient.h index 2d402092a..157edf669 100644 --- a/src/sp-gradient.h +++ b/src/sp-gradient.h @@ -42,7 +42,7 @@ class SPGradientReference; class SPStop; #define SP_GRADIENT(obj) ((SPGradient*)obj) -#define SP_IS_GRADIENT(obj) (dynamic_cast<const SPGradient*>((SPObject*)obj)) +#define SP_IS_GRADIENT(obj) (dynamic_cast<const SPGradient*>((SPObject*)obj) != NULL) enum SPGradientType { SP_GRADIENT_TYPE_UNKNOWN, diff --git a/src/sp-guide.h b/src/sp-guide.h index 9af56d12b..83a5e8349 100644 --- a/src/sp-guide.h +++ b/src/sp-guide.h @@ -24,7 +24,7 @@ struct SPCanvasGroup; class SPDesktop; #define SP_GUIDE(obj) ((SPGuide*)obj) -#define SP_IS_GUIDE(obj) (dynamic_cast<const SPGuide*>((SPObject*)obj)) +#define SP_IS_GUIDE(obj) (dynamic_cast<const SPGuide*>((SPObject*)obj) != NULL) /* Represents the constraint on p that dot(g.direction, p) == g.position. */ class SPGuide : public SPObject { diff --git a/src/sp-image.h b/src/sp-image.h index 066a63863..d18a4ca6e 100644 --- a/src/sp-image.h +++ b/src/sp-image.h @@ -15,7 +15,7 @@ */ #define SP_IMAGE(obj) ((SPImage*)obj) -#define SP_IS_IMAGE(obj) (dynamic_cast<const SPImage*>((SPObject*)obj)) +#define SP_IS_IMAGE(obj) (dynamic_cast<const SPImage*>((SPObject*)obj) != NULL) /* SPImage */ diff --git a/src/sp-item-group.h b/src/sp-item-group.h index f8d9014ab..ae77ed809 100644 --- a/src/sp-item-group.h +++ b/src/sp-item-group.h @@ -17,7 +17,7 @@ #include "sp-lpe-item.h" #define SP_GROUP(obj) ((SPGroup*)obj) -#define SP_IS_GROUP(obj) (dynamic_cast<const SPGroup*>((SPObject*)obj)) +#define SP_IS_GROUP(obj) (dynamic_cast<const SPGroup*>((SPObject*)obj) != NULL) #define SP_IS_LAYER(obj) (SP_IS_GROUP(obj) && SP_GROUP(obj)->layerMode() == SPGroup::LAYER) diff --git a/src/sp-item.h b/src/sp-item.h index a5587f7f6..1523f9a62 100644 --- a/src/sp-item.h +++ b/src/sp-item.h @@ -100,7 +100,7 @@ public: }; #define SP_ITEM(obj) ((SPItem*)obj) -#define SP_IS_ITEM(obj) (dynamic_cast<const SPItem*>((SPObject*)obj)) +#define SP_IS_ITEM(obj) (dynamic_cast<const SPItem*>((SPObject*)obj) != NULL) /** Abstract base class for all visible shapes. */ class SPItem : public SPObject { diff --git a/src/sp-line.h b/src/sp-line.h index 299fedc4c..66131f2c8 100644 --- a/src/sp-line.h +++ b/src/sp-line.h @@ -18,7 +18,7 @@ #include "sp-shape.h" #define SP_LINE(obj) ((SPLine*)obj) -#define SP_IS_LINE(obj) (dynamic_cast<const SPLine*>((SPObject*)obj)) +#define SP_IS_LINE(obj) (dynamic_cast<const SPLine*>((SPObject*)obj) != NULL) class SPLine : public SPShape { public: diff --git a/src/sp-linear-gradient.h b/src/sp-linear-gradient.h index 69052fe81..4f75d7ca8 100644 --- a/src/sp-linear-gradient.h +++ b/src/sp-linear-gradient.h @@ -9,7 +9,7 @@ #include "svg/svg-length.h" #define SP_LINEARGRADIENT(obj) ((SPLinearGradient*)obj) -#define SP_IS_LINEARGRADIENT(obj) (dynamic_cast<const SPLinearGradient*>((SPObject*)obj)) +#define SP_IS_LINEARGRADIENT(obj) (dynamic_cast<const SPLinearGradient*>((SPObject*)obj) != NULL) /** Linear gradient. */ class SPLinearGradient : public SPGradient { diff --git a/src/sp-lpe-item.h b/src/sp-lpe-item.h index 3b0a7bb77..0aac8f057 100644 --- a/src/sp-lpe-item.h +++ b/src/sp-lpe-item.h @@ -19,7 +19,7 @@ #include <list> #define SP_LPE_ITEM(obj) ((SPLPEItem*)obj) -#define SP_IS_LPE_ITEM(obj) (dynamic_cast<const SPLPEItem*>((SPObject*)obj)) +#define SP_IS_LPE_ITEM(obj) (dynamic_cast<const SPLPEItem*>((SPObject*)obj) != NULL) class CLPEItem; class LivePathEffectObject; diff --git a/src/sp-mask.h b/src/sp-mask.h index a2e97d671..16f967419 100644 --- a/src/sp-mask.h +++ b/src/sp-mask.h @@ -19,7 +19,7 @@ #include "xml/node.h" #define SP_MASK(obj) ((SPMask*)obj) -#define SP_IS_MASK(obj) (dynamic_cast<const SPMask*>((SPObject*)obj)) +#define SP_IS_MASK(obj) (dynamic_cast<const SPMask*>((SPObject*)obj) != NULL) struct SPMaskView; diff --git a/src/sp-mesh-gradient.h b/src/sp-mesh-gradient.h index a6ab29c09..fb59ad802 100644 --- a/src/sp-mesh-gradient.h +++ b/src/sp-mesh-gradient.h @@ -9,7 +9,7 @@ #include "sp-gradient.h" #define SP_MESHGRADIENT(obj) ((SPMeshGradient*)obj) -#define SP_IS_MESHGRADIENT(obj) (dynamic_cast<const SPMeshGradient*>((SPObject*)obj)) +#define SP_IS_MESHGRADIENT(obj) (dynamic_cast<const SPMeshGradient*>((SPObject*)obj) != NULL) /** Mesh gradient. */ class SPMeshGradient : public SPGradient { diff --git a/src/sp-mesh-patch.h b/src/sp-mesh-patch.h index 34bbb00d8..fe9f2d071 100644 --- a/src/sp-mesh-patch.h +++ b/src/sp-mesh-patch.h @@ -18,7 +18,7 @@ #include "sp-object.h" #define SP_MESHPATCH(obj) ((SPMeshPatch*)obj) -#define SP_IS_MESHPATCH(obj) (dynamic_cast<const SPMeshPatch*>((SPObject*)obj)) +#define SP_IS_MESHPATCH(obj) (dynamic_cast<const SPMeshPatch*>((SPObject*)obj) != NULL) /** Gradient MeshPatch. */ class SPMeshPatch : public SPObject { diff --git a/src/sp-mesh-row.h b/src/sp-mesh-row.h index 4f2e8842f..a9f8bfd31 100644 --- a/src/sp-mesh-row.h +++ b/src/sp-mesh-row.h @@ -15,7 +15,7 @@ #include "sp-object.h" #define SP_MESHROW(obj) ((SPMeshRow*)obj) -#define SP_IS_MESHROW(obj) (dynamic_cast<const SPMeshRow*>((SPObject*)obj)) +#define SP_IS_MESHROW(obj) (dynamic_cast<const SPMeshRow*>((SPObject*)obj) != NULL) /** Gradient MeshRow. */ class SPMeshRow : public SPObject { diff --git a/src/sp-metadata.h b/src/sp-metadata.h index 752ced9e3..a667b214a 100644 --- a/src/sp-metadata.h +++ b/src/sp-metadata.h @@ -18,7 +18,7 @@ /* Metadata base class */ #define SP_METADATA(obj) ((SPMetadata*)obj) -#define SP_IS_METADATA(obj) (dynamic_cast<const SPMetadata*>((SPObject*)obj)) +#define SP_IS_METADATA(obj) (dynamic_cast<const SPMetadata*>((SPObject*)obj) != NULL) class SPMetadata : public SPObject { public: diff --git a/src/sp-missing-glyph.h b/src/sp-missing-glyph.h index 368f25943..291ea626f 100644 --- a/src/sp-missing-glyph.h +++ b/src/sp-missing-glyph.h @@ -19,7 +19,7 @@ #include "sp-object.h" #define SP_MISSING_GLYPH(obj) ((SPMissingGlyph*)obj) -#define SP_IS_MISSING_GLYPH(obj) (dynamic_cast<const SPMissingGlyph*>((SPObject*)obj)) +#define SP_IS_MISSING_GLYPH(obj) (dynamic_cast<const SPMissingGlyph*>((SPObject*)obj) != NULL) class SPMissingGlyph : public SPObject { public: diff --git a/src/sp-namedview.h b/src/sp-namedview.h index 2ab0d9f34..92a31b11b 100644 --- a/src/sp-namedview.h +++ b/src/sp-namedview.h @@ -15,7 +15,7 @@ */ #define SP_NAMEDVIEW(obj) ((SPNamedView*)obj) -#define SP_IS_NAMEDVIEW(obj) (dynamic_cast<const SPNamedView*>((SPObject*)obj)) +#define SP_IS_NAMEDVIEW(obj) (dynamic_cast<const SPNamedView*>((SPObject*)obj) != NULL) #include "sp-object-group.h" #include "snap.h" diff --git a/src/sp-object-group.h b/src/sp-object-group.h index a34ef0721..552b321b1 100644 --- a/src/sp-object-group.h +++ b/src/sp-object-group.h @@ -17,7 +17,7 @@ #include "sp-object.h" #define SP_OBJECTGROUP(obj) ((SPObjectGroup*)obj) -#define SP_IS_OBJECTGROUP(obj) (dynamic_cast<const SPObjectGroup*>((SPObject*)obj)) +#define SP_IS_OBJECTGROUP(obj) (dynamic_cast<const SPObjectGroup*>((SPObject*)obj) != NULL) class SPObjectGroup : public SPObject { public: diff --git a/src/sp-object.h b/src/sp-object.h index 449049611..077633400 100644 --- a/src/sp-object.h +++ b/src/sp-object.h @@ -18,7 +18,7 @@ class SPObject; #define SP_OBJECT(obj) ((SPObject*)obj) -#define SP_IS_OBJECT(obj) (dynamic_cast<const SPObject*>((SPObject*)obj)) +#define SP_IS_OBJECT(obj) (dynamic_cast<const SPObject*>((SPObject*)obj) != NULL) /* Async modification flags */ #define SP_OBJECT_MODIFIED_FLAG (1 << 0) diff --git a/src/sp-offset.h b/src/sp-offset.h index f18fd4071..9d173b66a 100644 --- a/src/sp-offset.h +++ b/src/sp-offset.h @@ -17,7 +17,7 @@ #include <sigc++/sigc++.h> #define SP_OFFSET(obj) ((SPOffset*)obj) -#define SP_IS_OFFSET(obj) (dynamic_cast<const SPOffset*>((SPObject*)obj)) +#define SP_IS_OFFSET(obj) (dynamic_cast<const SPOffset*>((SPObject*)obj) != NULL) class SPUseReference; diff --git a/src/sp-paint-server.h b/src/sp-paint-server.h index 9bde0883f..4c77bdaa6 100644 --- a/src/sp-paint-server.h +++ b/src/sp-paint-server.h @@ -21,7 +21,7 @@ #include "uri-references.h" #define SP_PAINT_SERVER(obj) ((SPPaintServer*)obj) -#define SP_IS_PAINT_SERVER(obj) (dynamic_cast<const SPPaintServer*>((SPObject*)obj)) +#define SP_IS_PAINT_SERVER(obj) (dynamic_cast<const SPPaintServer*>((SPObject*)obj) != NULL) class SPPaintServer : public SPObject { public: diff --git a/src/sp-path.h b/src/sp-path.h index 89224b958..be3a1b03d 100644 --- a/src/sp-path.h +++ b/src/sp-path.h @@ -22,7 +22,7 @@ class SPCurve; #define SP_PATH(obj) ((SPPath*)obj) -#define SP_IS_PATH(obj) (dynamic_cast<const SPPath*>((SPObject*)obj)) +#define SP_IS_PATH(obj) (dynamic_cast<const SPPath*>((SPObject*)obj) != NULL) /** * SVG <path> implementation diff --git a/src/sp-pattern.h b/src/sp-pattern.h index 3e33528f8..c7a2a96c3 100644 --- a/src/sp-pattern.h +++ b/src/sp-pattern.h @@ -18,7 +18,7 @@ #include "sp-item.h" #define SP_PATTERN(obj) ((SPPattern*)obj) -#define SP_IS_PATTERN(obj) (dynamic_cast<const SPPattern*>((SPObject*)obj)) +#define SP_IS_PATTERN(obj) (dynamic_cast<const SPPattern*>((SPObject*)obj) != NULL) class SPPatternReference; diff --git a/src/sp-polygon.h b/src/sp-polygon.h index cb6c8a4f8..bac632a95 100644 --- a/src/sp-polygon.h +++ b/src/sp-polygon.h @@ -17,7 +17,7 @@ #define SP_POLYGON(obj) ((SPPolygon*)obj) -#define SP_IS_POLYGON(obj) (dynamic_cast<const SPPolygon*>((SPObject*)obj)) +#define SP_IS_POLYGON(obj) (dynamic_cast<const SPPolygon*>((SPObject*)obj) != NULL) class SPPolygon : public SPShape { public: diff --git a/src/sp-polyline.h b/src/sp-polyline.h index 91266d985..75c2217b5 100644 --- a/src/sp-polyline.h +++ b/src/sp-polyline.h @@ -4,7 +4,7 @@ #include "sp-shape.h" #define SP_POLYLINE(obj) ((SPPolyLine*)obj) -#define SP_IS_POLYLINE(obj) (dynamic_cast<const SPPolyLine*>((SPObject*)obj)) +#define SP_IS_POLYLINE(obj) (dynamic_cast<const SPPolyLine*>((SPObject*)obj) != NULL) class SPPolyLine : public SPShape { public: diff --git a/src/sp-radial-gradient.h b/src/sp-radial-gradient.h index 7514af2dc..e0be01b9b 100644 --- a/src/sp-radial-gradient.h +++ b/src/sp-radial-gradient.h @@ -10,7 +10,7 @@ #include "svg/svg-length.h" #define SP_RADIALGRADIENT(obj) ((SPRadialGradient*)obj) -#define SP_IS_RADIALGRADIENT(obj) (dynamic_cast<const SPRadialGradient*>((SPObject*)obj)) +#define SP_IS_RADIALGRADIENT(obj) (dynamic_cast<const SPRadialGradient*>((SPObject*)obj) != NULL) /** Radial gradient. */ class SPRadialGradient : public SPGradient { diff --git a/src/sp-rect.h b/src/sp-rect.h index 12f94a744..04026e051 100644 --- a/src/sp-rect.h +++ b/src/sp-rect.h @@ -20,7 +20,7 @@ #define SP_RECT(obj) ((SPRect*)obj) -#define SP_IS_RECT(obj) (dynamic_cast<const SPRect*>((SPObject*)obj)) +#define SP_IS_RECT(obj) (dynamic_cast<const SPRect*>((SPObject*)obj) != NULL) class SPRect : public SPShape { public: diff --git a/src/sp-root.h b/src/sp-root.h index d9c96da50..6853a8c8a 100644 --- a/src/sp-root.h +++ b/src/sp-root.h @@ -20,7 +20,7 @@ #include "sp-item-group.h" #define SP_ROOT(obj) ((SPRoot*)obj) -#define SP_IS_ROOT(obj) (dynamic_cast<const SPRoot*>((SPObject*)obj)) +#define SP_IS_ROOT(obj) (dynamic_cast<const SPRoot*>((SPObject*)obj) != NULL) class SPDefs; diff --git a/src/sp-script.h b/src/sp-script.h index 62d6eba7a..f6ef9d5fd 100644 --- a/src/sp-script.h +++ b/src/sp-script.h @@ -15,7 +15,7 @@ #include "sp-item.h" #define SP_SCRIPT(obj) ((SPScript*)obj) -#define SP_IS_SCRIPT(obj) (dynamic_cast<const SPScript*>((SPObject*)obj)) +#define SP_IS_SCRIPT(obj) (dynamic_cast<const SPScript*>((SPObject*)obj) != NULL) /* SPScript */ class SPScript : public SPObject { diff --git a/src/sp-shape.h b/src/sp-shape.h index 980bae934..806615606 100644 --- a/src/sp-shape.h +++ b/src/sp-shape.h @@ -23,7 +23,7 @@ #include <sigc++/connection.h> #define SP_SHAPE(obj) ((SPShape*)obj) -#define SP_IS_SHAPE(obj) (dynamic_cast<const SPShape*>((SPObject*)obj)) +#define SP_IS_SHAPE(obj) (dynamic_cast<const SPShape*>((SPObject*)obj) != NULL) #define SP_SHAPE_WRITE_PATH (1 << 2) diff --git a/src/sp-spiral.h b/src/sp-spiral.h index f6bce7b61..6066b6157 100644 --- a/src/sp-spiral.h +++ b/src/sp-spiral.h @@ -25,7 +25,7 @@ #define SP_SPIRAL(obj) ((SPSpiral*)obj) -#define SP_IS_SPIRAL(obj) (dynamic_cast<const SPSpiral*>((SPObject*)obj)) +#define SP_IS_SPIRAL(obj) (dynamic_cast<const SPSpiral*>((SPObject*)obj) != NULL) /** * A spiral Shape. diff --git a/src/sp-star.h b/src/sp-star.h index 48f17f161..fc6de84e1 100644 --- a/src/sp-star.h +++ b/src/sp-star.h @@ -18,7 +18,7 @@ #define SP_STAR(obj) ((SPStar*)obj) -#define SP_IS_STAR(obj) (dynamic_cast<const SPStar*>((SPObject*)obj)) +#define SP_IS_STAR(obj) (dynamic_cast<const SPStar*>((SPObject*)obj) != NULL) typedef enum { SP_STAR_POINT_KNOT1, diff --git a/src/sp-stop.h b/src/sp-stop.h index 17b156e31..b0bae50d1 100644 --- a/src/sp-stop.h +++ b/src/sp-stop.h @@ -17,7 +17,7 @@ class ustring; } #define SP_STOP(obj) ((SPStop*)obj) -#define SP_IS_STOP(obj) (dynamic_cast<const SPStop*>((SPObject*)obj)) +#define SP_IS_STOP(obj) (dynamic_cast<const SPStop*>((SPObject*)obj) != NULL) /** Gradient stop. */ class SPStop : public SPObject { diff --git a/src/sp-string.h b/src/sp-string.h index 2c6a92001..d7634a719 100644 --- a/src/sp-string.h +++ b/src/sp-string.h @@ -11,7 +11,7 @@ #include "sp-object.h" #define SP_STRING(obj) ((SPString*)obj) -#define SP_IS_STRING(obj) (dynamic_cast<const SPString*>((SPObject*)obj)) +#define SP_IS_STRING(obj) (dynamic_cast<const SPString*>((SPObject*)obj) != NULL) class SPString : public SPObject { public: diff --git a/src/sp-style-elem.h b/src/sp-style-elem.h index cc080eb90..83fe2ea5e 100644 --- a/src/sp-style-elem.h +++ b/src/sp-style-elem.h @@ -5,7 +5,7 @@ #include "media.h" #define SP_STYLE_ELEM(obj) ((SPStyleElem*)obj) -#define SP_IS_STYLE_ELEM(obj) (dynamic_cast<const SPStyleElem*>((SPObject*)obj)) +#define SP_IS_STYLE_ELEM(obj) (dynamic_cast<const SPStyleElem*>((SPObject*)obj) != NULL) class SPStyleElem : public SPObject { public: diff --git a/src/sp-switch.h b/src/sp-switch.h index 24a2dbae6..3323617f9 100644 --- a/src/sp-switch.h +++ b/src/sp-switch.h @@ -18,7 +18,7 @@ #include <sigc++/connection.h> #define SP_SWITCH(obj) ((SPSwitch*)obj) -#define SP_IS_SWITCH(obj) (dynamic_cast<const SPSwitch*>((SPObject*)obj)) +#define SP_IS_SWITCH(obj) (dynamic_cast<const SPSwitch*>((SPObject*)obj) != NULL) class SPSwitch : public SPGroup { public: diff --git a/src/sp-symbol.h b/src/sp-symbol.h index e0e98c62e..67e68d2e8 100644 --- a/src/sp-symbol.h +++ b/src/sp-symbol.h @@ -19,7 +19,7 @@ #define SP_TYPE_SYMBOL (sp_symbol_get_type ()) #define SP_SYMBOL(obj) ((SPSymbol*)obj) -#define SP_IS_SYMBOL(obj) (dynamic_cast<const SPSymbol*>((SPObject*)obj)) +#define SP_IS_SYMBOL(obj) (dynamic_cast<const SPSymbol*>((SPObject*)obj) != NULL) #include <2geom/affine.h> #include "svg/svg-length.h" diff --git a/src/sp-text.h b/src/sp-text.h index 7722a4c7a..b23865855 100644 --- a/src/sp-text.h +++ b/src/sp-text.h @@ -22,7 +22,7 @@ #include "libnrtype/Layout-TNG.h" #define SP_TEXT(obj) ((SPText*)obj) -#define SP_IS_TEXT(obj) (dynamic_cast<const SPText*>((SPObject*)obj)) +#define SP_IS_TEXT(obj) (dynamic_cast<const SPText*>((SPObject*)obj) != NULL) /* Text specific flags */ #define SP_TEXT_CONTENT_MODIFIED_FLAG SP_OBJECT_USER_MODIFIED_FLAG_A diff --git a/src/sp-textpath.h b/src/sp-textpath.h index 94672b36d..1191a59f6 100644 --- a/src/sp-textpath.h +++ b/src/sp-textpath.h @@ -10,7 +10,7 @@ class Path; #define SP_TEXTPATH(obj) ((SPTextPath*)obj) -#define SP_IS_TEXTPATH(obj) (dynamic_cast<const SPTextPath*>((SPObject*)obj)) +#define SP_IS_TEXTPATH(obj) (dynamic_cast<const SPTextPath*>((SPObject*)obj) != NULL) class SPTextPath : public SPItem { public: diff --git a/src/sp-title.h b/src/sp-title.h index 0660492ee..671527bc1 100644 --- a/src/sp-title.h +++ b/src/sp-title.h @@ -15,7 +15,7 @@ #include "sp-object.h" #define SP_TITLE(obj) ((SPTitle*)obj) -#define SP_IS_TITLE(obj) (dynamic_cast<const SPTitle*>((SPObject*)obj)) +#define SP_IS_TITLE(obj) (dynamic_cast<const SPTitle*>((SPObject*)obj) != NULL) class SPTitle : public SPObject { public: diff --git a/src/sp-tref.h b/src/sp-tref.h index 8be5afc18..f38a76e57 100644 --- a/src/sp-tref.h +++ b/src/sp-tref.h @@ -23,7 +23,7 @@ /* tref base class */ #define SP_TREF(obj) ((SPTRef*)obj) -#define SP_IS_TREF(obj) (dynamic_cast<const SPTRef*>((SPObject*)obj)) +#define SP_IS_TREF(obj) (dynamic_cast<const SPTRef*>((SPObject*)obj) != NULL) class SPTRef : public SPItem { public: diff --git a/src/sp-tspan.h b/src/sp-tspan.h index 75ef190c6..c86095273 100644 --- a/src/sp-tspan.h +++ b/src/sp-tspan.h @@ -10,7 +10,7 @@ #include "text-tag-attributes.h" #define SP_TSPAN(obj) ((SPTSpan*)obj) -#define SP_IS_TSPAN(obj) (dynamic_cast<const SPTSpan*>((SPObject*)obj)) +#define SP_IS_TSPAN(obj) (dynamic_cast<const SPTSpan*>((SPObject*)obj) != NULL) enum { SP_TSPAN_ROLE_UNSPECIFIED, diff --git a/src/sp-use.h b/src/sp-use.h index a1817fc32..b90c98ad2 100644 --- a/src/sp-use.h +++ b/src/sp-use.h @@ -19,7 +19,7 @@ #include "sp-item.h" #define SP_USE(obj) ((SPUse*)obj) -#define SP_IS_USE(obj) (dynamic_cast<const SPUse*>((SPObject*)obj)) +#define SP_IS_USE(obj) (dynamic_cast<const SPUse*>((SPObject*)obj) != NULL) class SPUseReference; diff --git a/src/spiral-context.h b/src/spiral-context.h index 9e3987eeb..21b109f07 100644 --- a/src/spiral-context.h +++ b/src/spiral-context.h @@ -24,7 +24,7 @@ #include "sp-spiral.h" #define SP_SPIRAL_CONTEXT(obj) ((SPSpiralContext*)obj) -#define SP_IS_SPIRAL_CONTEXT(obj) (dynamic_cast<const SPSpiralContext*>((const SPEventContext*)obj)) +#define SP_IS_SPIRAL_CONTEXT(obj) (dynamic_cast<const SPSpiralContext*>((const SPEventContext*)obj) != NULL) class SPSpiralContext : public SPEventContext { public: diff --git a/src/spray-context.h b/src/spray-context.h index 796f094cd..2b20ae13d 100644 --- a/src/spray-context.h +++ b/src/spray-context.h @@ -22,7 +22,7 @@ #include "event-context.h" #define SP_SPRAY_CONTEXT(obj) ((SPSprayContext*)obj) -#define SP_IS_SPRAY_CONTEXT(obj) (dynamic_cast<const SPSprayContext*>((const SPEventContext*)obj)) +#define SP_IS_SPRAY_CONTEXT(obj) (dynamic_cast<const SPSprayContext*>((const SPEventContext*)obj) != NULL) namespace Inkscape { namespace UI { diff --git a/src/text-context.h b/src/text-context.h index 8da7af7e5..196ecf576 100644 --- a/src/text-context.h +++ b/src/text-context.h @@ -24,7 +24,7 @@ #include "libnrtype/Layout-TNG.h" #define SP_TEXT_CONTEXT(obj) ((SPTextContext*)obj) -#define SP_IS_TEXT_CONTEXT(obj) (dynamic_cast<const SPTextContext*>((const SPEventContext*)obj)) +#define SP_IS_TEXT_CONTEXT(obj) (dynamic_cast<const SPTextContext*>((const SPEventContext*)obj) != NULL) struct SPCtrlLine; diff --git a/src/zoom-context.h b/src/zoom-context.h index b5d022e5e..70e9e04f5 100644 --- a/src/zoom-context.h +++ b/src/zoom-context.h @@ -16,7 +16,7 @@ #include "event-context.h" #define SP_ZOOM_CONTEXT(obj) ((SPZoomContext*)obj) -#define SP_IS_ZOOM_CONTEXT(obj) (dynamic_cast<const SPZoomContext*>((const SPEventContext*)obj)) +#define SP_IS_ZOOM_CONTEXT(obj) (dynamic_cast<const SPZoomContext*>((const SPEventContext*)obj) != NULL) class SPZoomContext : public SPEventContext { public: |
