]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
c++11: disambiguate std::isnan
authorCasey Bodley <cbodley@redhat.com>
Fri, 31 Jul 2015 14:56:55 +0000 (10:56 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 7 Aug 2015 15:42:58 +0000 (11:42 -0400)
c++11's isnan() is a constexpr function, while c's is a macro

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/common/obj_bencher.cc

index a5a9ea60325cfd1d2161bfa8b6577d1a2ff22eee..e384511324ed1fda18ee619eda7bac5a3eaafb74 100644 (file)
@@ -109,7 +109,7 @@ void *ObjBencher::status_printer(void *_bencher) {
     else
       bandwidth = 0;
 
-    if (!isnan(bandwidth) && bandwidth > 0) {
+    if (!std::isnan(bandwidth) && bandwidth > 0) {
       if (bandwidth > data.idata.max_bandwidth)
         data.idata.max_bandwidth = bandwidth;
       if (bandwidth < data.idata.min_bandwidth)
@@ -124,7 +124,7 @@ void *ObjBencher::status_printer(void *_bencher) {
     else
       iops = 0;
 
-    if (!isnan(iops)) {
+    if (!std::isnan(iops)) {
       if (iops > data.idata.max_iops)
         data.idata.max_iops = iops;
       if (iops < data.idata.min_iops)