From c00ca627fd2c7a7b98ac42ad1d9a8b004c19b55a Mon Sep 17 00:00:00 2001 From: "henrike@webrtc.org" Date: Mon, 23 Jun 2014 16:15:27 +0000 Subject: [PATCH] Rebase webrtc/base with r6521 version of talk/base: cd webrtc/base svn diff -r 6466:66521 http://webrtc.googlecode.com/svn/trunk/talk/base > 6521.diff patch -p0 -i 6521.diff BUG=3379 TBR=jiayl@webrtc.org Review URL: https://webrtc-codereview.appspot.com/17769004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6522 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/base/common.cc | 8 ++++++++ webrtc/base/common.h | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/webrtc/base/common.cc b/webrtc/base/common.cc index 8ea475b0e2..c6f1b75312 100644 --- a/webrtc/base/common.cc +++ b/webrtc/base/common.cc @@ -61,4 +61,12 @@ void LogAssert(const char* function, const char* file, int line, } } +bool IsOdd(int n) { + return (n & 0x1); +} + +bool IsEven(int n) { + return !IsOdd(n); +} + } // namespace rtc diff --git a/webrtc/base/common.h b/webrtc/base/common.h index 7f4a756391..afb747d7f6 100644 --- a/webrtc/base/common.h +++ b/webrtc/base/common.h @@ -98,6 +98,10 @@ typedef void (*AssertLogger)(const char* function, // only by one component. void SetCustomAssertLogger(AssertLogger logger); +bool IsOdd(int n); + +bool IsEven(int n); + } // namespace rtc #if ENABLE_DEBUG