Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1624: -> changed to >-

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Frunobulax Posted - Jan 17 2008 : 09:41:51 AM
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
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jan 17 2008 : 10:11:40 AM
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.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000