It is currently Tue Aug 11, 2020 10:25 pm


All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: [Resolved]: Some g++ 4.6 fixes
PostPosted: Fri Jul 01, 2011 9:14 am 

Joined: Thu Apr 28, 2011 9:07 pm
Posts: 7
Location: near Frankfurt/Main, Germany
When I compile PolyVox using g++ 4.6 and "-Wall -Wextra" (always a good idea) I get a bunch of warnings.

GradientEstimators.h contains a "#pragma" that g++ warns about. I think this pragma is entirely useless regarding code generation, so it can go.

SurfaceMesh.h / SurfaceMesh.inl contain a function "isEmpty()" which returns a "const bool". g++ warns about this, "bool" as return type is enought. As it is neither a reference nor a pointer, defining constness on it is a bit weird indeed.

AStarPathfinderImpl.h defines the member variables parent, gVal, hVal in this order. But the constructor initializes them in another order, which produces a warning as well. The cure is easy: make definition and initialization order the same.


Attachments:
fixes.patch [1.98 KiB]
Downloaded 239 times
Top
Offline Profile  
Reply with quote  
 Post subject: Re: Some g++ 4.6 fixes
PostPosted: Fri Jul 01, 2011 9:58 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Thanks, I've applied all your fixes.

HolgerSchurig wrote:
GradientEstimators.h contains a "#pragma" that g++ warns about. I think this pragma is entirely useless regarding code generation, so it can go.


In Visual Studio this #pragma is used for custom code folding. There used to be lots of them, but I didn't really use the feature and they generatd GCC warnings so I took them out. Seems I missed one.


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net