Changeset 2818


Ignore:
Timestamp:
Aug 29, 2012, 3:52:40 AM (9 years ago)
Author:
Peter
Message:

prefer 'if (b)' over 'if (a && b)' when 'b' is a subset of 'a'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/utility.h

    r2673 r2818  
    3434#include "deprecate.h"
    3535#include "Exception.h"
     36#include "yat_assert.h"
    3637
    3738#include <algorithm>
     
    377378        return true;
    378379      }
    379       if (std::numeric_limits<T>::is_signed && is_equal(s, "-inf")) {
     380      if (is_equal(s, "-inf")) {
     381        // unsigned types are caught in prologue
     382        YAT_ASSERT(std::numeric_limits<T>::is_signed);
    380383        result = -std::numeric_limits<T>::infinity();
    381384        return true;
Note: See TracChangeset for help on using the changeset viewer.