patchPSPP - Patches: patch #5825, Variable constness

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #5825: Variable constness

Submitted by:  John Darrington <jmd>
Submitted on:  Tue 27 Mar 2007 11:41:54 AM UTC  
 
Category:  None Item Group:  None
Status:  Done Assigned to:  None
Open/Closed:  Closed

Sun 01 Apr 2007 06:05:58 PM UTC, comment #3: 

This is fine.  Thanks!

Ben Pfaff <blp>
Project Administrator
Sun 01 Apr 2007 05:55:12 AM UTC, comment #2: 

OK.  Here's a revised patch against the current head.

It uses casts instead of templates.

(file #12361)

John Darrington <jmd>
Project Administrator
Wed 28 Mar 2007 05:29:49 AM UTC, comment #1: 

Some of this is fine.  There are plenty of places where const could be used that it isn't, and I don't object at all to adding it in those situations.

But I absolutely hate the idea of duplicating entire source files and compiling them twice to have a "const" qualifier in one and not in the other.  It's ugly to look at, it wastes compile time, it wastes memory at runtime, and it even potentially wastes time at runtime due to expanded cache footprint.  In return, I can't think of any corresponding benefit.  Perhaps we drop a cast or two, or avoid one or two warnings?  Not at all worth it IMO.

Ben Pfaff <blp>
Project Administrator
Tue 27 Mar 2007 11:41:54 AM UTC, original submission:  

This patch fixes a number of constness kludges, and ensures that everying compiles without warnings.  The major thing that's changed is that hash.[ch] are now templated on hash.[ch].in so that hashes of both const and non-const objects can be compiled from the same source.

John Darrington <jmd>
Project Administrator

 

Attached Files
file #12361:  const.patch added by jmd (165KiB - text/x-diff)
file #12309:  const.patch added by jmd (247KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by blp (Posted a comment)
  • -email is unavailable- added by jmd (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-04-03 jmd Open/ClosedOpen => Closed
    2007-04-02 jmd StatusWorks For Me => Done
        Assigned toblp => None
    2007-04-01 blp StatusReady For Test/Review => Works For Me
    2007-04-01 jmd Attached File- => Added const.patch, #12361
        Assigned toNone => blp
    2007-03-27 jmd Attached File- => Added const.patch, #12309

    Back to the top


    Powered by Savane 3.5