1. 09 May, 2016 11 commits
  2. 07 May, 2016 1 commit
  3. 28 Mar, 2016 1 commit
  4. 16 Mar, 2016 2 commits
  5. 11 Mar, 2016 1 commit
  6. 09 Mar, 2016 7 commits
  7. 08 Mar, 2016 1 commit
  8. 05 Mar, 2016 7 commits
  9. 17 Feb, 2016 1 commit
    • Filip Roséen's avatar
      nothrow new in cases where it maches intent · 1bed74fe
      Filip Roséen authored and Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen committed
      
      
      I wrote a hackish script to locate instances where new can throw
      but where the original author has assumed that it will return
      nullptr when there is a memory allocation problem.
      
      In short, cases such as `ptr = new T; if (ptr) ...` has now
      been changed to `ptr = new (std::nothrow) T; if (ptr) ...`.
      
      Since a throwing `new` will always yield a non-nullptr pointer,
      code that follows similar patterns to the previous example are
      therefor redundant.
      
      Example (from modules/access/dshow/filter.cpp):
      
          *ppEnum = new CaptureEnumMediaTypes( p_input, p_pin, this );
      
          if( *ppEnum == NULL )
            return E_OUTOFMEMORY; // unreachable, new will never return NULL
      
      Fixed:
      
          *ppEnum = new (std::nothrow) CaptureEnumMediaTypes( p_input, p_pin, this );
      
          if( *ppEnum == NULL )
            return E_OUTOFMEMORY;
      Signed-off-by: Hugo Beauzée-Luyssen's avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
      1bed74fe
  10. 30 Dec, 2015 1 commit
  11. 08 Dec, 2015 1 commit
  12. 06 Jul, 2015 1 commit
  13. 22 Jun, 2015 1 commit
  14. 16 Mar, 2015 3 commits
  15. 13 Mar, 2015 1 commit