mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 13:38:19 +00:00
Code modernization: Convert from deprecated C standard library headers
This commit is contained in:
parent
823d80494b
commit
7c4fd382d9
104 changed files with 160 additions and 165 deletions
10
src/Desc.cc
10
src/Desc.cc
|
@ -4,10 +4,10 @@
|
|||
|
||||
#include "zeek/zeek-config.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <cerrno>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#include "zeek/3rdparty/ConvertUTF.h"
|
||||
#include "zeek/File.h"
|
||||
|
@ -179,7 +179,7 @@ void ODesc::Add(double d, bool no_exp)
|
|||
return v < 0 ? -v < tolerance : v < tolerance;
|
||||
};
|
||||
|
||||
if ( approx_equal(d, nearbyint(d), 1e-9) && isfinite(d) && ! strchr(tmp, 'e') )
|
||||
if ( approx_equal(d, nearbyint(d), 1e-9) && std::isfinite(d) && ! strchr(tmp, 'e') )
|
||||
// disambiguate from integer
|
||||
Add(".0");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue