non-bug-fix-patch. Removed the need for using a GHashTable in svg/svg-color.cpp

Bug #970237 reported by Samuel Chase
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Samuel Chase

Bug Description

Removed the need for using a GHashTable in svg/svg-color.cpp.
I used a map<string, unsigned long> instead.

Tags: c++ internals
Revision history for this message
Samuel Chase (samebchase) wrote :

Inkscape segfaults with this patch.

Changed in inkscape:
status: New → Invalid
Revision history for this message
Samuel Chase (samebchase) wrote :

Made some more changes.

This seems to work.

Changed in inkscape:
status: Invalid → New
Revision history for this message
Samuel Chase (samebchase) wrote :

Removes some typcasting.

Revision history for this message
Samuel Chase (samebchase) wrote :

Even more prettified.

Revision history for this message
Samuel Chase (samebchase) wrote :

fixed bug in previous patch

Kris (kris-degussem)
Changed in inkscape:
importance: Undecided → Low
assignee: nobody → Samuel Chase (samebchase)
milestone: none → 0.49
status: New → In Progress
Revision history for this message
Kris (kris-degussem) wrote :

Thanks for the patch.

Patch committed in trunk revision 11152 along with the following modifications:
- check on colors size changed in empty check (should be better according to the code checker cppcheck: " Checking for 'colors' emptiness might be inefficient. Using colors.empty() instead of colors.size() can be faster. colors.size() can take linear time but colors.empty() is guaranteed to take constant time.")
- I additionally converted some existing c-type variable casts to their c++ counterparts

Changed in inkscape:
status: In Progress → Fix Committed
Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.