Skip to content

Commit

Permalink
Do not warn if half.h has already being included (#255)
Browse files Browse the repository at this point in the history
The issue with the warning of halfLimits.h being deprecated is that it
is very tempting to simply remove the include of halfLimits.h in favor
of simply half.h. However this change does depends on the version of
Imath used, and halfLimits.h should be kept for compatibility with
older version. Simply do not warn if short.h is already included.

Signed-off-by: Jules Maselbas <[email protected]>
  • Loading branch information
jmaselbas authored and cary-ilm committed Nov 3, 2022
1 parent 878127f commit fedb112
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Imath/halfLimits.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#ifndef INCLUDED_HALF_LIMITS_H
#define INCLUDED_HALF_LIMITS_H

// Warn if half.h hasn't being included
#ifndef IMATH_HALF_H_
//
// This file is now deprecated. It previously included the
// specialization of std::numeric_limits<half>, but those now appear
Expand All @@ -20,5 +22,5 @@
#endif

#include "half.h"

#endif
#endif

0 comments on commit fedb112

Please sign in to comment.