Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:goupilmtos:games
marsshooter
no-return-in-nonvoid-function.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File no-return-in-nonvoid-function.patch of Package marsshooter
From 4eb59b40ecb17ac69eeb5f32d6714474233edc4f Mon Sep 17 00:00:00 2001 Message-Id: <4eb59b40ecb17ac69eeb5f32d6714474233edc4f.1486475141.git.matthias@mailaender.name> From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= <matthias@mailaender.name> Date: Tue, 7 Feb 2017 14:45:34 +0100 Subject: [PATCH] Fix compiler warning no-return-in-nonvoid-function --- include/Specials/NoSpecial.hpp | 2 +- include/Weapons/NoWeapon.hpp | 6 +++--- src/Interface/Tab.cpp | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/Specials/NoSpecial.hpp b/include/Specials/NoSpecial.hpp index 4c1c8d3..46a69b6 100644 --- a/include/Specials/NoSpecial.hpp +++ b/include/Specials/NoSpecial.hpp @@ -32,7 +32,7 @@ class NoSpecial: public Special { /// Does nothing. void activate() const {} - float radius() const {} + float radius() const { return .0F; } /// Draws the special. void draw(float alpha) const; diff --git a/include/Weapons/NoWeapon.hpp b/include/Weapons/NoWeapon.hpp index e739851..291e44d 100644 --- a/include/Weapons/NoWeapon.hpp +++ b/include/Weapons/NoWeapon.hpp @@ -35,13 +35,13 @@ class NoWeapon: public Weapon { void draw(float alpha) const {} /// Returns the maximum distance from which this weapon should be used. - float maxDistance() const {} + float maxDistance() const { return .0F; } /// Returns the minimum distance from which this weapon should be used. - float minDistance() const {} + float minDistance() const { return .0F; } /// Returns the maximum angle from which this weapon should be used. - float maxAngle() const {} + float maxAngle() const { return .0F; } }; # endif // NOWEAPON_HPP_INCLUDED diff --git a/src/Interface/Tab.cpp b/src/Interface/Tab.cpp index 19a7e26..e0dd57e 100644 --- a/src/Interface/Tab.cpp +++ b/src/Interface/Tab.cpp @@ -110,6 +110,7 @@ bool Tab::tabNext() { return true; } } + return false; } bool Tab::tabPrevious() { @@ -140,6 +141,7 @@ bool Tab::tabPrevious() { return true; } } + return false; } -- 2.11.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor