bugHepMC - a C++ Event Record for Monte Carlo Generators - Bugs: bug #52240, Compilation warning in HepMC/Flow.h

 
 
Show feedback again

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

bug #52240: Compilation warning in HepMC/Flow.h

Submitted by:  Lynn Garren <garren>
Submitted on:  2009-06-24 00:52  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Lynn Garren <garren>Open/Closed: Closed

2009-07-04 03:57, comment #2:

HepMC 2.03.11 is now available with this fix.

Lynn Garren <garren>
Project AdministratorIn charge of this item.
2009-06-24 01:07, comment #1:

Indeed, the proposed fix would also make the code more correct. The change has been submitted to cvs for the next bug fix release.

Lynn Garren <garren>
Project AdministratorIn charge of this item.
2009-06-24 00:52, original submission:

Bug posted for Marco Cattaneo

I am undertaking a campaign to clean up compilation warnings on our Windows build of the LHCb software. The following one is deep in HepMC:

D:\local\lib\lcg\external\HepMC\2.03.09\win32_vc71\include\HepMC\Flow.h(181) : warning C4800: 'std::_Tree<_Traits>::size_type' : forcing value to bool 'true' or 'false' (performance warning)

It comes from the line

inline bool Flow::erase( int code_index ) {
return (bool)m_icode.erase( code_index );
}

I guess you would get the same result, and fix the warning, if you were to change it to something like:

inline bool Flow::erase( int code_index ) {
return ( m_icode.erase( code_index ) == 0 ? false:true );
}

Lynn Garren <garren>
Project AdministratorIn charge of this item.

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by garren (Submitted the item)
  • -unavailable- added by garren
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independantly of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    2009-07-04 03:57garrenStatusNone=>Fixed
      Open/ClosedOpen=>Closed
      Closed on2009-07-04 03:57=>2009-07-04 03:57
    2009-06-24 00:52garrenCarbon-Copy-=>Added -unavailable-
    Show feedback again

    Back to the top


    Powered by Savane SVN (toward 3.1)

    This project has been migrated to a new system.
    You will be redirected in 5 seconds.
    Or click here to go now.
    Let me continue in Savannah