Skip to content
Snippets Groups Projects
Commit 47ff8532 authored by scott snyder's avatar scott snyder
Browse files

BPhysTools: Fix clang warning.

Max uint64_t cannot be represented exactly as a double.
parent 4cda231e
No related branches found
No related tags found
No related merge requests found
/* /*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/ */
// system include: // system include:
...@@ -21,8 +21,12 @@ namespace xAOD { ...@@ -21,8 +21,12 @@ namespace xAOD {
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
// Private static constants // Private static constants
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
// This gives 0x10000 on a 64-bit platform.
// ??? Would probably be better to write these using bit operations,
// rather than FP, to avoid potential rounding issues.
// (eg. the maximum uint64_t cannot be represented exactly as a double)
const SimpleEncrypter::ULLI_t SimpleEncrypter::m_MAXRANGE = const SimpleEncrypter::ULLI_t SimpleEncrypter::m_MAXRANGE =
(SimpleEncrypter::ULLI_t)pow(std::numeric_limits<ULLI_t>::max(), 0.25); (SimpleEncrypter::ULLI_t)pow(static_cast<double>(std::numeric_limits<ULLI_t>::max()), 0.25);
const SimpleEncrypter::ULLI_t SimpleEncrypter::m_MINRANGE = const SimpleEncrypter::ULLI_t SimpleEncrypter::m_MINRANGE =
(SimpleEncrypter::ULLI_t)SimpleEncrypter::m_MAXRANGE/10; (SimpleEncrypter::ULLI_t)SimpleEncrypter::m_MAXRANGE/10;
const unsigned int SimpleEncrypter::m_MAXHEXDIGITS = const unsigned int SimpleEncrypter::m_MAXHEXDIGITS =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment