Skip to content

C++ sample in ensure-no-overuse.md uses undeclared variable and wrong call order #31

Description

@lyzhang0113

Found while reviewing docs in PR #30, not fixed there since it touches a code sample.

File: license/ensure-no-overuse.md, around line 54-56

The C++ sample declares a settings object as settings on line 54, but then references it as setting (singular) on line 56:

settings.someOtherField = ...;   // line 54, declared as `settings`
...
setting.maxParallelTasks = licenseCount;   // line 56, typo'd as `setting`

This won't compile as written.

Separately, the same sample calls SetMaxConcurrentInstanceCount after InitLicense, which is the opposite order from the C++ and Python samples elsewhere in the same file. Worth double-checking which order is actually correct/required and making the samples consistent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions