Skip to content

[OGRE-39] Ogre::Window::getCustomAttribute() uses void*  #12

@paroj

Description

@paroj

[reporter="spacegaier", created="Sat, 24 Nov 2012 20:08:54 +0100"]

Original reporter: Sauce

The void* argument in Ogre::Window::getCustomAttribute() should be replaced with an Ogre::Any return value to promote type-safety.

Whilst not entirely trivial to implement (each platform uses a different implementation), the changes shouldn't affect plugin writers in any significant way as custom render systems aren't common.

End users will only have to add 1 or 2 lines of code to handle the changes to the interface, to handle casting to the appropriate type.

Current usage:
size_t hWnd = 0;
m_pWindow->getCustomAttribute("WINDOW", &hWnd);

Proposed usage:
size_t hWnd = Ogre::any_cast(m_pWindow->GetCustomAttribute("WINDOW"));

Original Mantis Ticket: http://www.ogre3d.org/mantis/view.php?id=422

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions