Skip to content

Commit 3c5749b

Browse files
authored
Fix compile warning (#2337)
1 parent 7cd1ae8 commit 3c5749b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/inc/drogon/HttpAppFramework.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@
4343
#include <vector>
4444
#include <chrono>
4545

46-
#if defined(__APPLE__) && defined(__MACH__)
47-
#if defined(__ENVIRONMENT_IPHONE_OS__) || \
48-
defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
46+
#if defined(__APPLE__) && defined(__MACH__) && \
47+
(defined(__ENVIRONMENT_IPHONE_OS__) || \
48+
defined(__IPHONE_OS_VERSION_MIN_REQUIRED))
4949
// iOS
5050
#define TARGET_OS_IOS 1
51-
#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
52-
// macOS
53-
#endif
51+
#else
52+
// not iOS
53+
#define TARGET_OS_IOS 0
5454
#endif
5555

5656
namespace drogon

lib/src/StaticFileRouter.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void StaticFileRouter::init(const std::vector<trantor::EventLoop *> &ioLoops)
4444
size_t i) {
4545
assert(i == ioLoops[i]->index());
4646
mapPtr = std::make_unique<CacheMap<std::string, char>>(ioLoops[i],
47-
1.0,
47+
1.0f,
4848
4,
4949
50);
5050
});

0 commit comments

Comments
 (0)