← Back to team overview

hugin-devs team mailing list archive

[Bug 2105441] [NEW] conversion from underlying type of an enum to fp is deprecated

 

Public bug reported:

Enblend defines many enums where the underlying value is used as a
static integer constant, sometimes relying on the property that it's
constexpr.  This was a common practice before the introduction of
'constexpr' in c++11.  Since c++20 the implicit conversion of an enum to
float is deprecated leading to warnings.

This patch replaces several enums by constexpr static int, and static
member functions by constexpr static T, partly to resolve warnings,
partly as a style improvement.  There is no change in functionality.

** Affects: enblend
     Importance: Undecided
         Status: New

** Patch added: "enum-to-constexpr.patch"
   https://bugs.launchpad.net/bugs/2105441/+attachment/5868399/+files/enum-to-constexpr.patch

-- 
You received this bug notification because you are a member of Hugin
Developers, which is subscribed to Enblend.
https://bugs.launchpad.net/bugs/2105441

Title:
  conversion from underlying type of an enum to fp is deprecated

Status in Enblend:
  New

Bug description:
  Enblend defines many enums where the underlying value is used as a
  static integer constant, sometimes relying on the property that it's
  constexpr.  This was a common practice before the introduction of
  'constexpr' in c++11.  Since c++20 the implicit conversion of an enum
  to float is deprecated leading to warnings.

  This patch replaces several enums by constexpr static int, and static
  member functions by constexpr static T, partly to resolve warnings,
  partly as a style improvement.  There is no change in functionality.

To manage notifications about this bug go to:
https://bugs.launchpad.net/enblend/+bug/2105441/+subscriptions