Skip to content

Commit

Permalink
Address link warnings from data in non-static functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Cydrak authored and Cydrak committed Aug 3, 2013
1 parent f0a1f7c commit 20389ac
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions nall/input.hpp
Expand Up @@ -11,7 +11,7 @@
namespace nall {

struct Keyboard;
Keyboard& keyboard(unsigned = 0);
static inline Keyboard& keyboard(unsigned = 0);

static const char KeyboardScancodeName[][64] = {
"Escape", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12",
Expand Down Expand Up @@ -122,7 +122,7 @@ struct Keyboard {
Keyboard(unsigned ID_) : ID(ID_) {}
};

inline Keyboard& keyboard(unsigned id) {
static inline Keyboard& keyboard(unsigned id) {
static Keyboard kb0(0), kb1(1), kb2(2), kb3(3), kb4(4), kb5(5), kb6(6), kb7(7);
switch(id) { default:
case 0: return kb0; case 1: return kb1; case 2: return kb2; case 3: return kb3;
Expand All @@ -136,7 +136,7 @@ static const char MouseScancodeName[][64] = {
};

struct Mouse;
Mouse& mouse(unsigned = 0);
static inline Mouse& mouse(unsigned = 0);

struct Mouse {
const unsigned ID;
Expand Down Expand Up @@ -220,7 +220,7 @@ struct Mouse {
Mouse(unsigned ID_) : ID(ID_) {}
};

inline Mouse& mouse(unsigned id) {
static inline Mouse& mouse(unsigned id) {
static Mouse ms0(0), ms1(1), ms2(2), ms3(3), ms4(4), ms5(5), ms6(6), ms7(7);
switch(id) { default:
case 0: return ms0; case 1: return ms1; case 2: return ms2; case 3: return ms3;
Expand All @@ -239,7 +239,7 @@ static const char JoypadScancodeName[][64] = {
};

struct Joypad;
Joypad& joypad(unsigned = 0);
static inline Joypad& joypad(unsigned = 0);

struct Joypad {
const unsigned ID;
Expand Down Expand Up @@ -345,7 +345,7 @@ struct Joypad {
Joypad(unsigned ID_) : ID(ID_) {}
};

inline Joypad& joypad(unsigned id) {
static inline Joypad& joypad(unsigned id) {
static Joypad jp0(0), jp1(1), jp2(2), jp3(3), jp4(4), jp5(5), jp6(6), jp7(7);
switch(id) { default:
case 0: return jp0; case 1: return jp1; case 2: return jp2; case 3: return jp3;
Expand Down

0 comments on commit 20389ac

Please sign in to comment.