diff options
| author | Thomas Holder <thomas@thomas-holder.de> | 2018-10-06 13:28:39 +0000 |
|---|---|---|
| committer | Thomas Holder <thomas@thomas-holder.de> | 2018-10-06 13:28:39 +0000 |
| commit | 03c35f6065f45346634cdcd8a9d13e4f167549c0 (patch) | |
| tree | 3a892c439d37cff565592d93e124137e70a42c31 /src/style.cpp | |
| parent | Add new style register style property for stop color and opacity (diff) | |
| download | inkscape-03c35f6065f45346634cdcd8a9d13e4f167549c0.tar.gz inkscape-03c35f6065f45346634cdcd8a9d13e4f167549c0.zip | |
SPAttributeEnum typed function arguments
Diffstat (limited to 'src/style.cpp')
| -rw-r--r-- | src/style.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/style.cpp b/src/style.cpp index e3642fdb2..802cfb22d 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -506,8 +506,8 @@ SPStyle::~SPStyle() { } void -SPStyle::clear(/* SPAttributeEnum */ int id) { - SPIBase *p = _prop_helper.get(this, (SPAttributeEnum)id); +SPStyle::clear(SPAttributeEnum id) { + SPIBase *p = _prop_helper.get(this, id); if (p) { p->clear(); } else { @@ -667,7 +667,7 @@ SPStyle::readFromPrefs(Glib::ustring const &path) { // Matches sp_style_merge_property(SPStyle *style, gint id, gchar const *val) void -SPStyle::readIfUnset( gint id, gchar const *val, SPStyleSrc const &source ) { +SPStyle::readIfUnset(SPAttributeEnum id, gchar const *val, SPStyleSrc const &source ) { // std::cout << "SPStyle::readIfUnset: Entrance: " << id << ": " << (val?val:"null") << std::endl; // To Do: If it is not too slow, use std::map instead of std::vector inorder to remove switch() @@ -710,7 +710,7 @@ SPStyle::readIfUnset( gint id, gchar const *val, SPStyleSrc const &source ) { return; } - auto p = _prop_helper.get(this, (SPAttributeEnum)id); + auto p = _prop_helper.get(this, id); if (p) { p->readIfUnset(val, source); } else { @@ -856,7 +856,7 @@ SPStyle::_mergeDecl( CRDeclaration const *const decl, SPStyleSrc const &source // std::cout << "SPStyle::_mergeDecl" << std::endl; - unsigned const prop_idx = sp_attribute_lookup(decl->property->stryng->str); + auto prop_idx = sp_attribute_lookup(decl->property->stryng->str); if (prop_idx != SP_ATTR_INVALID) { /** \todo * effic: Test whether the property is already set before trying to |
