From 05a1df5154ae5f631308233382e703b9aaa71b0b Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Sun, 16 Aug 2015 00:07:31 +0200 Subject: [PATCH] msvc does not like gcc attributes --- alethzero/MainFace.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/alethzero/MainFace.h b/alethzero/MainFace.h index 5db473678..2e9f806a8 100644 --- a/alethzero/MainFace.h +++ b/alethzero/MainFace.h @@ -43,8 +43,13 @@ namespace shh { class WhisperHost; } namespace az { +#ifndef _MSC_VER // MSVC does not like gcc compiler attributes #define DEV_AZ_NOTE_PLUGIN(ClassName) \ static bool s_notePlugin __attribute__((unused)) = [](){ MainFace::notePlugin([](MainFace* m){ return new ClassName(m); }); return true; }() +#else +#define DEV_AZ_NOTE_PLUGIN(ClassName) \ + static bool s_notePlugin = [](){ MainFace::notePlugin([](MainFace* m){ return new ClassName(m); }); return true; }() +#endif class Plugin; class MainFace;