Skip to content
  • Marc Mutz's avatar
    QDomNode: don't needlessly call virtual functions · 3518db0b
    Marc Mutz authored
    Commit 4dabe783
    
     changed
    these functions from virtuals to inlines that check the
    return value of the remaining virtual function nodeType().
    
    However, two of the functions call nodeType() more than
    once, which we know will return the same result each time,
    but requires a compiler with interprocedural optimization
    capabilities to figure out by itself.
    
    So instead of repeatedly calling nodeType(), call it once
    and store its return value in a temporary, and use the
    temp for further comparisions.
    
    Change-Id: Idbeafb7fd93d275d475218c6df2ad7fdc9162cc5
    Reviewed-by: default avatarRichard J. Moore <rich@kde.org>
    3518db0b