Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Code Inspection / size_t issue

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
GerdH Posted - Mar 23 2018 : 8:48:00 PM
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?
1   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Mar 23 2018 : 10:20:29 PM
Makes sense, I've put in a bug report for this:

case=115330

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