Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 1624: -> changed to >-
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Frunobulax
Ketchup Master

84 Posts

Posted - Jan 17 2008 :  09:41:51 AM  Show Profile  Reply with Quote
Hi,

I changed a type from a struct to a boost::shared_ptr.

Consequently I had to change "iterator->second.member" to "iterator->second->member" in some places. Well, so I did, but afterwards all these places looked like "iterator->second>-member"! (The iterator coming from a map where the second entry had the type in question.)

This is reproducable in my real-life project. Changing the "->" (or ">-") back to a point, erasing the point (with backspace) and typing "->" results in a ">-".

And the coolest thing about it: For once I was able to reproduce the bug in a small code snippet :-)


#include <boost/shared_ptr.hpp>
#include <map>

struct myStruct {
    bool myMember;
};
typedef boost::shared_ptr<myStruct> myPtr;

void doSomething( void )
{
    myPtr test;

    std::map<int, myPtr> myMap;

    for (std::map<int, myPtr>::const_iterator it = myMap.begin(); it != myMap.end(); ++it) {
        if (it->second.myMember) {
            // do something
        }
    }
}


Change the dot in front of the red myMember to a "->", placing the caret behind the "." and using the key sequence Backspace - >, and you'll see "it->second>-myMember". (At least if you do it on my computer.)

Regards, Thomas

"The nice part about being a pessimist
is that you are constantly being either
proven right or pleasantly surprised."
(George F. Will)

feline
Whole Tomato Software

United Kingdom
18943 Posts

Posted - Jan 17 2008 :  10:11:40 AM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=9160

For me this only happens if you type "->" quickly. If you type this more slowly the characters are left the correct way round.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000