From 38c71d13d71ef180284a912f88b6eaaa73c5fdf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sat, 5 Aug 2006 00:24:12 +0000 Subject: [PATCH] * fixed build for PathContainer.cpp (stupid last minute change...) * fixed crashing bug in Shape, it doesn't "own" the Style... * fixed problem in Shape in for non Icon-O-Matic build, fNeedsUpdate still needs to be maintained. Having a read-only version has definitely improved efficiency! The icon import time must have dropped 50%. The overall penalty for reading vector icons in Tracker seems to be 1.5 to 2 ms now, including parsing and rendering at 32x32. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18398 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/libs/icon/shape/PathContainer.cpp | 4 ++-- src/libs/icon/shape/Shape.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/libs/icon/shape/PathContainer.cpp b/src/libs/icon/shape/PathContainer.cpp index 4bb29c1bd1..e0d3367baa 100644 --- a/src/libs/icon/shape/PathContainer.cpp +++ b/src/libs/icon/shape/PathContainer.cpp @@ -24,9 +24,9 @@ PathContainerListener::~PathContainerListener() {} // constructor PathContainer::PathContainer(bool ownsPaths) : fPaths(16), - fOwnsPaths(ownsPaths), + fOwnsPaths(ownsPaths) #ifdef ICON_O_MATIC - fListeners(2) + , fListeners(2) #endif { } diff --git a/src/libs/icon/shape/Shape.cpp b/src/libs/icon/shape/Shape.cpp index f1f5cf79e8..b49f579a8b 100644 --- a/src/libs/icon/shape/Shape.cpp +++ b/src/libs/icon/shape/Shape.cpp @@ -416,8 +416,6 @@ Shape::SetStyle(::Style* style) fStyle->Release(); } ::Style* oldStyle = fStyle; -#else - delete fStyle; #endif fStyle = style; @@ -505,6 +503,8 @@ Shape::AddTransformer(Transformer* transformer, int32 index) transformer->AddObserver(this); _NotifyTransformerAdded(transformer, index); +#else + fNeedsUpdate = true; #endif return true; } @@ -518,6 +518,8 @@ Shape::RemoveTransformer(Transformer* transformer) transformer->RemoveObserver(this); _NotifyTransformerRemoved(transformer); +#else + fNeedsUpdate = true; #endif return true; }