Skip to content

Usage of const variables #27

@marbre

Description

@marbre

There are several functions, where variables are declared, assigned a few lines later and not reassigned later on. E.g. the variable eps_t in refine_roots_newton:

    REAL re_bound_val, im_bound_val, eps_t;
    UINT trunc_index;
    trunc_index = D;
    eps_t = (T[1] - T[0])/(D - 1);

Does it respect your style if refactored as follows?

    REAL re_bound_val, im_bound_val;
    UINT trunc_index;
    trunc_index = D;
    const REAL eps_t = (T[1] - T[0])/(D - 1);

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