summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0dfb4a9)
raw | patch | inline | side by side (parent: 0dfb4a9)
author | kiirala <kiirala@users.sourceforge.net> | |
Tue, 5 Feb 2008 07:15:06 +0000 (07:15 +0000) | ||
committer | kiirala <kiirala@users.sourceforge.net> | |
Tue, 5 Feb 2008 07:15:06 +0000 (07:15 +0000) |
src/sp-filter.cpp | patch | blob | history | |
src/sp-filter.h | patch | blob | history |
diff --git a/src/sp-filter.cpp b/src/sp-filter.cpp
index c74a9ffdb974da0dca92348bb7c4f8dbe5c6761d..150033895202aea50541345839874ed4431463a5 100644 (file)
--- a/src/sp-filter.cpp
+++ b/src/sp-filter.cpp
filter->_renderer = NULL;
- filter->_image_name = map<gchar *, int, ltstr>();
+ filter->_image_name = new std::map<gchar *, int, ltstr>;
+ filter->_image_name->clear();
filter->filterRes = NumberOptNumber();
}
filter->modified_connection.~connection();
+ delete filter->_image_name;
if (((SPObjectClass *) filter_parent_class)->release)
((SPObjectClass *) filter_parent_class)->release(object);
int sp_filter_get_image_name(SPFilter *filter, gchar const *name) {
gchar *name_copy = strdup(name);
- map<gchar *, int, ltstr>::iterator result = filter->_image_name.find(name_copy);
+ map<gchar *, int, ltstr>::iterator result = filter->_image_name->find(name_copy);
free(name_copy);
- if (result == filter->_image_name.end()) return -1;
+ if (result == filter->_image_name->end()) return -1;
else return (*result).second;
}
int value = filter->_image_number_next;
filter->_image_number_next++;
gchar *name_copy = strdup(name);
- pair<map<gchar*,int,ltstr>::iterator,bool> ret = filter->_image_name.insert(pair<gchar*,int>(name_copy, value));
+ pair<gchar*,int> new_pair(name_copy, value);
+ pair<map<gchar*,int,ltstr>::iterator,bool> ret = filter->_image_name->insert(new_pair);
if (ret.second == false) {
return (*ret.first).second;
}
diff --git a/src/sp-filter.h b/src/sp-filter.h
index 9c4e7aaf6e405625beb1cad2ab9853e23836de64..3e9bb3cb09871726142fd8f67bda45a4853dadde 100644 (file)
--- a/src/sp-filter.h
+++ b/src/sp-filter.h
NR::Filter *_renderer;
- std::map<gchar *, int, ltstr> _image_name;
+ std::map<gchar *, int, ltstr>* _image_name;
int _image_number_next;
};