Add the stub headers from https://codereview.webrtc.org/2877023002 as a separate commit. This preserves git blame history of the moved files. BUG=webrtc:7634 NOTRY=True TBR=kwiberg@webrtc.org Change-Id: Ic141abf11801fbfdeea5bcdb23608696ad449013 Reviewed-on: https://chromium-review.googlesource.com/554623 Reviewed-by: Henrik Kjellander <kjellander@webrtc.org> Cr-Commit-Position: refs/heads/master@{#18822}
40 lines
1.6 KiB
C
40 lines
1.6 KiB
C
/*
|
|
* Copyright 2016 The WebRTC Project Authors. All rights reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
// This file defines six constexpr functions:
|
|
//
|
|
// rtc::SafeEq // ==
|
|
// rtc::SafeNe // !=
|
|
// rtc::SafeLt // <
|
|
// rtc::SafeLe // <=
|
|
// rtc::SafeGt // >
|
|
// rtc::SafeGe // >=
|
|
//
|
|
// They each accept two arguments of arbitrary types, and in almost all cases,
|
|
// they simply call the appropriate comparison operator. However, if both
|
|
// arguments are integers, they don't compare them using C++'s quirky rules,
|
|
// but instead adhere to the true mathematical definitions. It is as if the
|
|
// arguments were first converted to infinite-range signed integers, and then
|
|
// compared, although of course nothing expensive like that actually takes
|
|
// place. In practice, for signed/signed and unsigned/unsigned comparisons and
|
|
// some mixed-signed comparisons with a compile-time constant, the overhead is
|
|
// zero; in the remaining cases, it is just a few machine instructions (no
|
|
// branches).
|
|
|
|
#ifndef WEBRTC_BASE_SAFE_COMPARE_H_
|
|
#define WEBRTC_BASE_SAFE_COMPARE_H_
|
|
|
|
|
|
// This header is deprecated and is just left here temporarily during
|
|
// refactoring. See https://bugs.webrtc.org/7634 for more details.
|
|
#include "webrtc/rtc_base/safe_compare.h"
|
|
|
|
#endif // WEBRTC_BASE_SAFE_COMPARE_H_
|