Skip to content

Color::Adapt breaks with const float * argument #1957

Description

@slipher
float w[] = {1,1,1,1};
const float* p = w;
Color::Color c = Color::Adapt(p);
Log::Notice("%g %g %g %g", c.Red(), c.Green(), c.Blue(), c.Alpha());

This produces the output:

2.93874e-39 2.93874e-39 2.93874e-39 2.93874e-39

having decided that 3e38 or whatever is the maximum range for a const float color.

Perhaps the time is ripe to NUKE a lot of template nonsense.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-APIAPI & ABI provided to gamelogicT-Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions