From 0d09d1db02de7c51eb72b71925e86ff45aaaa160 Mon Sep 17 00:00:00 2001 From: Alex Hultman Date: Sun, 4 Nov 2018 08:59:34 +0100 Subject: [PATCH] Multiple definitions --- src/HttpResponse.h | 4 ++-- src/Loop.h | 2 +- src/Utilities.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/HttpResponse.h b/src/HttpResponse.h index 754b28b..6477777 100644 --- a/src/HttpResponse.h +++ b/src/HttpResponse.h @@ -29,10 +29,10 @@ namespace uWS { /* Some pre-defined status constants to use with writeStatus */ -const char *HTTP_200_OK = "200 OK"; +static const char *HTTP_200_OK = "200 OK"; /* The general timeout for HTTP sockets */ -const int HTTP_TIMEOUT_S = 10; +static const int HTTP_TIMEOUT_S = 10; template struct HttpResponse : public AsyncSocket { diff --git a/src/Loop.h b/src/Loop.h index c2ac5d6..ff17ffa 100644 --- a/src/Loop.h +++ b/src/Loop.h @@ -122,7 +122,7 @@ public: }; /* Can be called from any thread to run the thread local loop */ -void run() { +inline void run() { Loop::defaultLoop()->run(); } diff --git a/src/Utilities.h b/src/Utilities.h index 6ebd4cc..7c3243a 100644 --- a/src/Utilities.h +++ b/src/Utilities.h @@ -24,7 +24,7 @@ namespace uWS { namespace utils { -int u32toaHex(uint32_t value, char *dst) { +inline int u32toaHex(uint32_t value, char *dst) { char palette[] = "0123456789abcdef"; char temp[10]; char *p = temp; @@ -42,7 +42,7 @@ int u32toaHex(uint32_t value, char *dst) { return ret; } -int u32toa(uint32_t value, char *dst) { +inline int u32toa(uint32_t value, char *dst) { char temp[10]; char *p = temp; do {