diff options
| author | Marc Jeanmougin <mc@localhost.localdomain> | 2015-02-27 02:10:36 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <mc@localhost.localdomain> | 2015-02-27 02:10:36 +0000 |
| commit | 9a7fa4d1899d30ec745107823f307b2a0bf3172f (patch) | |
| tree | 216bd7b47a96425af53642e2c3869a70ebfa23e5 /src/selection-describer.cpp | |
| parent | should replace buggy pot file (diff) | |
| download | inkscape-9a7fa4d1899d30ec745107823f307b2a0bf3172f.tar.gz inkscape-9a7fa4d1899d30ec745107823f307b2a0bf3172f.zip | |
corrected the casts (hopefully)
(bzr r13922.1.10)
Diffstat (limited to 'src/selection-describer.cpp')
| -rw-r--r-- | src/selection-describer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/selection-describer.cpp b/src/selection-describer.cpp index d86cfa700..441ce6ea6 100644 --- a/src/selection-describer.cpp +++ b/src/selection-describer.cpp @@ -47,7 +47,7 @@ char* collect_terms (const std::vector<SPItem*> &items) bool first = true; for ( std::vector<SPItem*>::const_iterator iter=items.begin();iter!=items.end();iter++ ) { - SPItem *item = dynamic_cast<SPItem *>(reinterpret_cast<SPObject *>(*iter)); + SPItem *item = *iter; if (item) { const char *term = item->displayName(); if (term != NULL && g_slist_find (check, term) == NULL) { @@ -66,7 +66,7 @@ static int count_terms (const std::vector<SPItem*> &items) GSList *check = NULL; int count=0; for ( std::vector<SPItem*>::const_iterator iter=items.begin();iter!=items.end();iter++ ) { - SPItem *item = dynamic_cast<SPItem *>(reinterpret_cast<SPObject *>(*iter)); + SPItem *item = *iter; if (item) { const char *term = item->displayName(); if (term != NULL && g_slist_find (check, term) == NULL) { @@ -83,7 +83,7 @@ static int count_filtered (const std::vector<SPItem*> &items) { int count=0; for ( std::vector<SPItem*>::const_iterator iter=items.begin();iter!=items.end();iter++ ) { - SPItem *item = dynamic_cast<SPItem *>(reinterpret_cast<SPObject *>((*iter))); + SPItem *item = *iter; if (item) { count += item->isFiltered(); } @@ -127,7 +127,7 @@ void SelectionDescriber::_updateMessageFromSelection(Inkscape::Selection *select if (items.empty()) { // no items _context.set(Inkscape::NORMAL_MESSAGE, _when_nothing); } else { - SPItem *item = dynamic_cast<SPItem *>(reinterpret_cast<SPObject *>(items.front())); + SPItem *item = items[0]; g_assert(item != NULL); SPObject *layer = selection->layers()->layerForObject(item); SPObject *root = selection->layers()->currentRoot(); |
