Skip to content

Commit

Permalink
Do not warn if half.h has already being included (AcademySoftwareFoun…
Browse files Browse the repository at this point in the history
…dation#255)

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 <jmaselbas@zdiv.net>
  • Loading branch information
jmaselbas authored and cary-ilm committed Oct 31, 2022
1 parent d097561 commit 2768c53
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 2768c53

Please sign in to comment.