Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Remove all C style casts #675

Closed
Closed

Description

@ljbade

From discussion with @artemp we should replace all C style casts with the correct C++ cast.

It may be possible to use g++'s -Wold-style-cast flag to find them. Clang might also support this too.

Activity

  1. DennisOSRM commented on Dec 2, 2014

    @DennisOSRM

    IIRC, -Wold-style-cast is supported on clang, too.

  2. self-assigned this
    on Aug 11, 2015
  3. 8 remaining items

  4. ljbade commented on Aug 12, 2015

    @ljbade
    ContributorAuthor

    Hmm OK.

    It sounds like objective C should be ignored to start with.

  5. ljbade commented on Aug 12, 2015

    @ljbade
    ContributorAuthor

    Proposal is to get gyp to only apply the -Wold-stlye-cast flag to *.cpp files.

    @incanus What about the changes to remove the use of malloc in MGLMapView and MGLMapPoint?

    I replaced it with std::unique_ptr but is this too C++y and no ObjCy?

  6. ljbade commented on Aug 12, 2015

    @ljbade
    ContributorAuthor

    OK I restored the branch and will start removing the ObjC changes.

  7. incanus commented on Aug 12, 2015

    @incanus
    Contributor

    What about the changes to remove the use of malloc in MGLMapView and MGLMapPoint?

    Nah, I think this is ok. Anything which results in less manual memory management is 👍 in my book.

  8. ljbade commented on Aug 13, 2015

    @ljbade
    ContributorAuthor

    @kkaefer Do you know much about how to apply compile flags based on file extension?

  9. mb12 commented on Aug 13, 2015

    @mb12

    In Xcode, you can apply compile flags on a per file basis. Its frequently used to integrate older non-ARC code with ARC codebase. I am not sure if gyp supports this.

    http://stackoverflow.com/questions/6646052/how-can-i-disable-arc-for-a-single-file-in-a-project

  10. jfirebaugh commented on Mar 5, 2016

    @jfirebaugh
    Contributor

    These are pretty much gone.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions