The iteration list through the available data formatters was undefined,
which meant that the vector<bool> formatter kicked in only in cases
where it happened to be queried before the general vector formatter. To
fix this, I merge the two data formatter entries into one, and select
which implementation to use in the factory function.
Details
Diff Detail
- Build Status
Buildable 5457 Build 5457: arc lint + arc unit
Event Timeline
Remove the vector<bool> summary provider as well (picked up from Tamas's version of the patch).
The previous version of the data formatter was triggering for std::vector<std::allocator<bool>> as well. Jason, do you know why was it the case? Do we need that functionality because of a broken compiler version or can it be removed?
Note: I added a few comments about the data formatter itself but feel free to ignore them if you want to keep this change small.
source/Plugins/Language/CPlusPlus/LibCxxVector.cpp | ||
---|---|---|
52–53 | Not needed | |
199–226 | This switch seems silly. You can just replace it with "mask = (1 << bit_index)" | |
231–232 | I think the formatting here makes the code pretty hard to read | |
273–276 | Is there a reason you are not using ValueObject::GetCompilerType()? |
source/Plugins/Language/CPlusPlus/LibCxxVector.cpp | ||
---|---|---|
273–276 | Because I did not know it exists. :) |
This all looks good to me, thanks for doing this Pavel. Tamas asked in an earlier comment, "The previous version of the data formatter was triggering for std::vector<std::allocator<bool>> as well. Jason, do you know why was it the case? Do we need that functionality because of a broken compiler version or can it be removed?"
I have no idea why that was there. I could dig around in the svn commit history to try to figure it out, but it may have been unnecessary to begin with. If in doubt, we can drop it and put it back in if we hear of any problems.
Not needed