Skip to content

Commit 5108e32

Browse files
committed
rfb: fix rcswitch anonymous include
1 parent d0029bc commit 5108e32

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

code/espurna/rfbridge.cpp

+4-5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ Copyright (C) 2016-2019 by Xose Pérez <xose dot perez at gmail dot com>
2424
#include <list>
2525
#include <memory>
2626

27+
#if RFB_PROVIDER == RFB_PROVIDER_RCSWITCH
28+
#include <RCSwitch.h>
29+
#endif
30+
2731
// -----------------------------------------------------------------------------
2832
// GLOBALS TO THE MODULE
2933
// -----------------------------------------------------------------------------
@@ -33,18 +37,13 @@ namespace {
3337
unsigned char _rfb_repeats = RFB_SEND_REPEATS;
3438

3539
#if RFB_PROVIDER == RFB_PROVIDER_RCSWITCH
36-
37-
#include <RCSwitch.h>
3840
std::unique_ptr<RCSwitch> _rfb_modem;
3941
bool _rfb_receive { false };
4042
bool _rfb_transmit { false };
41-
4243
#else
43-
4444
Stream* _rfb_port { nullptr };
4545
constexpr bool _rfb_receive { true };
4646
constexpr bool _rfb_transmit { true };
47-
4847
#endif
4948

5049
std::forward_list<RfbCodeHandler> _rfb_code_handlers;

0 commit comments

Comments
 (0)