Skip to content

C++ conformance issues #1

@randomascii

Description

@randomascii

I tried compiling this code in the context of the Chromium build system and hit some issues that I think are genuine C++ conformance issues.

One is that LoaderLog.cpp depends on the min macro from Windows.h which is generally considered to be a bad thing. It would be better to use std::min. To do that you need to:
a) #define NOMINMAX before #include <Windows.h>
b) #include algorithm
c) Keep the types in the two min calls consistent - the LHS and RHS have to match. This can be done by casting nDebugStringLength to size_t, and getting ride of the cast of the result so that size is of type size_t. I'm not sure why you cast the results of the second min so maybe get rid of that as well (but it is harmless).

Okay, maybe that is it. I hit other glitches but I can't explain them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions