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
 Code Inspection / size_t issue
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

GerdH
New Member

USA
7 Posts

Posted - Mar 23 2018 :  8:48:00 PM  Show Profile  Reply with Quote
I just applied 10 of your code inspection modernizations to ~40 cpp/h files and the result builds and runs. You guys ROCK!

I found one minor issue with the loop conversion in a cpp file that gets built for both x86 and x64:
	static const int count = 10;
	size_t m_pathPositions[count];

	for (size_t ii = 0; ii < count; ++ii)
		m_pathPositions[ii] = 1234;


This gets converted differently for x86 versus x64:
x86:    for (unsigned int & pathPosition : m_pathPositions)

x64:    for (unsigned long long & pathPosition : m_pathPositions)


Which of course results in a build error in one of the configurations. It seems like the correct conversion is:
for (size_t & pathPosition : m_pathPositions)


which builds fine in both cases.

Is it a reasonable request that size_t is special-cased in the loop conversion?

____
Gerd

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 23 2018 :  10:20:29 PM  Show Profile  Reply with Quote
Makes sense, I've put in a bug report for this:

case=115330
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