你遇到过的源代码中最好的注释是什么?


当前回答

// if the resultMap size is less than or equal to zero
// then the product is added
if (resultMap.size() <= 0)

其他回答

} catch (PartInitException pie) {
    // Mmm... pie
public boolean isDirty() {
    //Why do you always go out and
    return dirty;
}

BerkeleyDB

/*
 * Chaos reigns within.
 * Reflect, repent, and reboot.
 * Order shall return.
 */
return (DB_RUNRECOVERY);

我最喜欢的(我必须承认我用过很多次):

// Yes...I know this is repulsive and stupid.
// But <%CompanyOwnerOrManagerToken%>, not knowing a thing about code,
// demanded I do it anyways. SO, go crap on their desk, not mine.
// K THX BYE 
// The freshest corpse at the back please.
m_DeadCharacters.push_back( std::make_pair(character, 0.0f) );
// Get rid of the rotting surplus
while( m_DeadCharacters.size() > 3 )
    m_DeadCharacters.pop_front();