Skip to content

Commit 5d34f5e

Browse files
committed
fix: use std:: prefix instead of 'namespace std'
Signed-off-by: Thomas Klausner <wiz@gatalith.at>
1 parent 09c11d9 commit 5d34f5e

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

src/libOpenImageIO/imagebufalgo_compare.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121

2222
#include "imageio_pvt.h"
2323

24-
using namespace std;
25-
2624
OIIO_NAMESPACE_BEGIN
2725

2826

@@ -82,11 +80,11 @@ ImageBufAlgo::PixelStats::operator=(PixelStats&& other)
8280
inline void
8381
val(ImageBufAlgo::PixelStats& p, int c, float value)
8482
{
85-
if (isnan(value)) {
83+
if (std::isnan(value)) {
8684
++p.nancount[c];
8785
return;
8886
}
89-
if (isinf(value)) {
87+
if (std::isinf(value)) {
9088
++p.infcount[c];
9189
return;
9290
}
@@ -219,10 +217,10 @@ compare_value(ImageBuf::ConstIterator<BUFT, float>& a, int chan, VALT aval,
219217
bool& warned, float failthresh, float warnthresh,
220218
float failrelative, float warnrelative)
221219
{
222-
if (!isfinite(aval) || !isfinite(bval)) {
223-
if (isnan(aval) == isnan(bval) && isinf(aval) == isinf(bval))
220+
if (!std::isfinite(aval) || !std::isfinite(bval)) {
221+
if (std::isnan(aval) == std::isnan(bval) && std::isinf(aval) == std::isinf(bval))
224222
return; // NaN may match NaN, Inf may match Inf
225-
if (isfinite(result.maxerror)) {
223+
if (std::isfinite(result.maxerror)) {
226224
// non-finite errors trump finite ones
227225
result.maxerror = std::numeric_limits<float>::infinity();
228226
result.maxx = a.x();

0 commit comments

Comments
 (0)