commit | d1bcf1180a07c2168ea4f7b14d869e2986e01e2f | [log] [tgz] |
---|---|---|
author | andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | Wed Oct 23 19:11:32 2013 +0000 |
committer | andrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | Wed Oct 23 19:11:32 2013 +0000 |
tree | 205cbc64ec57c3d73e73d530538920f66d15add1 | |
parent | 22858d4785f245c5a61941c328ffeef6075efb8c [diff] [blame] |
Check if WARN_UNUSED_RESULT and COMPILE_ASSERT are defined. Works around a multiple definition error from webrtc and libjingle. Corresponds to the libjingle change here: https://critique.corp.google.com/#review/55489575-p10 TESTED=trybots R=wu@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2809004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@5025 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/system_wrappers/interface/compile_assert.h b/webrtc/system_wrappers/interface/compile_assert.h index 0c8776d..cdeaa56 100644 --- a/webrtc/system_wrappers/interface/compile_assert.h +++ b/webrtc/system_wrappers/interface/compile_assert.h
@@ -28,13 +28,16 @@ // the expression is false, most compilers will issue a warning/error // containing the name of the variable. +// TODO(ajm): Hack to avoid multiple definitions until the base/ of webrtc and +// libjingle are merged. +#if !defined(COMPILE_ASSERT) template <bool> struct CompileAssert { }; -#undef COMPILE_ASSERT #define COMPILE_ASSERT(expr, msg) \ typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] +#endif // COMPILE_ASSERT // Implementation details of COMPILE_ASSERT: //