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
 _T("%SYSTEMROOT%") expanded during "move to impl"
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

peterchen
Tomato Guru

126 Posts

Posted - Jan 07 2010 :  10:07:16 AM  Show Profile  Reply with Quote
foo.h:
class Foo
{
   void Bar()
   {
      CPath p(_T("%SYSTEMROOT%\\\\some.file"));
      p.ExpandEnvStrings();
   }
}


Select Bar(), run "Move to implementation".

----- Observed:

void Foo::Bar()
{
   CPath p(_T("C:\\Windows\\\\some.file"));
   p.ExpandEnvStrings();
}


----- Expected:
My precious platform independent string constants remain platform independent (and precious).


VS 2008, VAX 1738 (also, VAX 1734), XP

Severity: this was part of a larger method, and I caught this only because the compiler was warning about '\\W' being an invalid escape sequence. It would likely slip through all tests. From this POV, I'd rate it "dangerous".

Edited by - peterchen on Jan 07 2010 11:12:55 AM

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jan 07 2010 :  1:47:33 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description:

case=37970
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jan 31 2010 :  1:38:28 PM  Show Profile  Reply with Quote
case=37970 is fixed in build 1810

Whole Tomato Software, Inc.
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