Changeset 54388 in webkit


Ignore:
Timestamp:
Feb 4, 2010 5:01:45 PM (14 years ago)
Author:
Darin Adler
Message:

2010-02-04 Darin Adler <Darin Adler>

Reviewed by David Levin.

Make MathExtras.h compatible with <cmath>
https://bugs.webkit.org/show_bug.cgi?id=34618

  • wtf/MathExtras.h: Include <cmath> instead of <math.h>. Use "using" as we do elsewhere in WTF for the four functions from <cmath> we want to use without the prefix. Later we could consider making the std explicit at call sites instead.
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r54362 r54388  
     12010-02-04  Darin Adler  <darin@apple.com>
     2
     3        Reviewed by David Levin.
     4
     5        Make MathExtras.h compatible with <cmath>
     6        https://bugs.webkit.org/show_bug.cgi?id=34618
     7
     8        * wtf/MathExtras.h: Include <cmath> instead of <math.h>.
     9        Use "using" as we do elsewhere in WTF for the four functions from <cmath>
     10        we want to use without the prefix. Later we could consider making the std
     11        explicit at call sites instead.
     12
    1132010-02-04  Tamas Szirbucz  <szirbucz@inf.u-szeged.hu>
    214
  • trunk/JavaScriptCore/wtf/MathExtras.h

    r54121 r54388  
    11/*
    2  * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2727#define WTF_MathExtras_h
    2828
     29#include <cmath>
    2930#include <float.h>
    30 #include <math.h>
    3131#include <stdlib.h>
    3232
     
    187187inline float grad2rad(float g) { return g * piFloat / 200.0f; }
    188188
     189using std::isfinite;
     190using std::isinf;
     191using std::isnan;
     192using std::signbit;
     193
    189194#endif // #ifndef WTF_MathExtras_h
Note: See TracChangeset for help on using the changeset viewer.