Skip to content

Commit 9d54f16

Browse files
r-barnesfacebook-github-bot
authored andcommitted
Del redundant-static-def in arvr/projects/ariane/aria_research_kit/projectaria_tools/core/image/DefaultImageValTraits.h +2
Summary: LLVM has a warning `-Wdeprecated-redundant-constexpr-static-def` which raises the warning: > warning: out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated Since we are now on C++20, we can remove the out-of-line definition of constexpr static data members. This diff does so. - If you approve of this diff, please use the "Accept & Ship" button :-) Reviewed By: meyering Differential Revision: D78494011 fbshipit-source-id: 5548b4ad2a98d40752db4397f4b4e684e403e0ff
1 parent b6104d8 commit 9d54f16

2 files changed

Lines changed: 0 additions & 6 deletions

File tree

core/image/DefaultImageValTraits.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ struct DefaultImageValTraits {
3030
static const size_t channel = 1;
3131
};
3232

33-
template <class T, class Enable>
34-
constexpr int DefaultImageValTraits<T, Enable>::maxValue;
35-
3633
template <class T>
3734
struct DefaultImageValTraits<T, typename std::enable_if<std::is_integral<T>::value>::type> {
3835
static constexpr int maxValue = (sizeof(T) >= sizeof(int))

core/image/Image.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,6 @@ PROJECTARIA_HOST_DEVICE inline T Image<T, MaxValue>::operator()(P u, P v) const
386386
}
387387
}
388388

389-
template <typename T, int MaxValue>
390-
constexpr int Image<T, MaxValue>::maxValue;
391-
392389
static_assert(Image<uint8_t>::maxValue == 255, "Compile time sanity check");
393390
static_assert(Image<float>::maxValue == 1, "Compile time sanity check");
394391
static_assert(Image<uint16_t, 1023>::maxValue == 1023, "Compile time sanity check");

0 commit comments

Comments
 (0)