Skip to content

Possibly missed reference symbol in Wrapped constructor #1797

Closed

Description

@koshinus

Godot version

4.4 stable

godot-cpp version

4.4 stable

System information

Windows 10, Linux, MacOS

Issue description

Wrapped(const StringName p_godot_class);

During the reading the engine code i spotted this strange line. Here we have unnecessary copying. I guess it was a misprint at last made commit. Everything is building fine if add reference symbol here and in cpp-file.

Steps to reproduce

Go and check link above.

Minimal reproduction project

Godot-cpp itself.

Activity

  1. dsnopek commented on Aug 20, 2025

    @dsnopek
    Collaborator

    Are you saying this should be const StringName & (with the &)?

    That would certainly fit with how we usually pass StringNames, and, while I haven't tested it, I don't think it should cause isssues

  2. dsnopek commented on Aug 20, 2025

    @dsnopek
    Collaborator

    I've just posted PR #1834 which makes this change - seems to work fine!

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