fixed error with bounding box calculation / code simplification - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/scalable.h
diff options
context:
space:
mode:
authorfrancesco-ST <francesco.abbate@st.com>2010年10月22日 15:46:07 +0200
committerfrancesco-ST <francesco.abbate@st.com>2010年10月22日 15:46:07 +0200
commite1d06a81b148252b25fea22c47e29abc95e86ea4 (patch)
tree5ac6593477800de35c1f268fc11214ce07e59a28 /agg-plot/scalable.h
parent60e7238f4c48e7653c4627c6bd78b959044687e9 (diff)
downloadgsl-shell-e1d06a81b148252b25fea22c47e29abc95e86ea4.tar.gz
fixed error with bounding box calculation / code simplification
The "dispose" method was no longer needed. Now we use normal destructors.
Diffstat (limited to 'agg-plot/scalable.h')
-rw-r--r--agg-plot/scalable.h 16
1 files changed, 3 insertions, 13 deletions
diff --git a/agg-plot/scalable.h b/agg-plot/scalable.h
index fae4a31a..8599fd33 100644
--- a/agg-plot/scalable.h
+++ b/agg-plot/scalable.h
@@ -30,10 +30,7 @@ struct vertex_source {
virtual ~vertex_source() { };
};
-struct scalable : public vertex_source {
- virtual bool dispose() = 0;
- virtual ~scalable() { };
-};
+typedef vertex_source scalable;
template <class T, bool approx>
class vs_proxy : public vertex_source {
@@ -81,8 +78,6 @@ class boxed_scalable : public scalable {
virtual unsigned vertex(double* x, double* y) { return m_object->vertex(x, y); };
virtual void apply_transform(const agg::trans_affine& m, double as) { m_object->apply_transform(m, as); };
- virtual bool dispose() { return false; };
-
private:
boxed_scalable();
};
@@ -98,6 +93,8 @@ protected:
public:
vs_adapter(base_type* src): m_output(*src), m_source(src) { };
+
+ ~vs_adapter() { delete this->m_source; };
template <class init_type>
vs_adapter(base_type* src, init_type& val):
@@ -114,13 +111,6 @@ public:
return m_output.vertex(x, y);
};
- virtual bool dispose()
- {
- if (this->m_source->dispose())
- delete this->m_source;
- return true;
- };
-
conv_type& self() { return m_output; };
};
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月18日 03:46:52 +0000

AltStyle によって変換されたページ (->オリジナル) /