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
 Bug where -> when typing .
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

xMRi
Tomato Guru

Germany
315 Posts

Posted - Nov 23 2022 :  06:54:18 AM  Show Profile  Reply with Quote
Write this code


__time64_t tmUTC;
auto tm = *::_gmtime64(&tmUTC);
COleDateTime nowUTC{ tm.| };


The Pipe sign shows the position of the caret.
I type "tm." and "tm->" appears. And happens when adding more parameters in the initializer list every time I type tm.

PS: I know that tmUTC has an invalid value and need initialization...
Reparsing the file doesn't bring any fix.

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming

Edited by - xMRi on Nov 23 2022 06:59:51 AM

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Nov 23 2022 :  07:54:12 AM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=148866

This is happening since VA thinks the auto variable "tm" is a pointer, even though you have dereferenced the function return type. If you are able to remove the global scope :: from the _gmtime64() function call then the bug disappears, at least for me. But I don't know if that would be an option for you.

zen is the art of being at one with the two'ness
Go to Top of Page

xMRi
Tomato Guru

Germany
315 Posts

Posted - Nov 24 2022 :  06:34:12 AM  Show Profile  Reply with Quote
This is possible. But usually I use the global scope :: operator, to signal the reader of the code that the function belongs to a classical external C/CRT Library...
Not really needed but a coding style here.

Martin Richter [rMVP] WWJD http://blog.m-ri.de
"A well-written program is its own heaven; a poorly written
program is its own hell!" The Tao of Programming
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Nov 24 2022 :  12:17:15 PM  Show Profile  Reply with Quote
That makes sense. I assumed you were using global scope for a reason, and ideally VA should handle this correctly. You can also use Undo or Backspace to undo the dot being converted to -> when you don't want this. Another work around, but worth being aware of.

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