Skip to content

Calvario.cpp:5:24: error: ‘MAX_INT’ was not declared in this scope #1

Description

@rl2939

Problem

The module Calvario does not seem to compile as is. The error message below is:

src/Calvario.cpp: In member function ‘virtual void Calvario::process(const rack::engine::Module::ProcessArgs&)’:
src/Calvario.cpp:5:24: error: ‘MAX_INT’ was not declared in this scope; did you mean ‘MAX_INPUT’?
    5 | #define MIN_Q31 (1.f / MAX_INT)
      |                        ^~~~~~~
src/Calvario.cpp:86:54: note: in expansion of macro ‘MIN_Q31’
   86 |         float xor_float = ((float)xor_result * 5.f * MIN_Q31);
      |             

Solution:

Replace MAX_INT with INT_MAX. This make the module compile.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions