Skip to content

display_server_wayland.cpp has unreachable code #99392

Open
@maddin200

Description

Tested versions

4.3 src Linux

System information

Linux

Issue description

File:

Point2i DisplayServerWayland::mouse_get_position() const {
MutexLock mutex_lock(wayland_thread.mutex);
// We can't properly implement this method by design.
// This is the best we can do unfortunately.
return Input::get_singleton()->get_mouse_position();
return Point2i();
}

Code:

Point2i DisplayServerWayland::mouse_get_position() const {
	MutexLock mutex_lock(wayland_thread.mutex);

	// We can't properly implement this method by design.
	// This is the best we can do unfortunately.
	return Input::get_singleton()->get_mouse_position();

	return Point2i(); // <- unreachable
}

Steps to reproduce

see above

Minimal reproduction project (MRP)

see above

Edit by the production team: added syntax highlighting and added the link to the file.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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