Remove usage of rtc_base/checks.h in 3pp base64.cc
rtc_base/base64.h and rtc_base/base64.cc are third_party files in webrtc repo and we are planning to move them into third_party folder. To be able to do it, we need to eliminate all dependencies from this files on webrtc code base. So thic CL will remove dependency on rtc_base.checks.h. After it we will be able to move base64 files. Bug: webrtc:8366 Change-Id: I79d252daef974e95bb43a1566d05e603922aea3f Reviewed-on: https://webrtc-review.googlesource.com/84126 Commit-Queue: Artem Titov <titovartem@webrtc.org> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23702}
This commit is contained in:
@ -495,10 +495,6 @@ rtc_source_set("base64") {
|
||||
"base64.cc",
|
||||
"base64.h",
|
||||
]
|
||||
|
||||
deps = [
|
||||
":checks",
|
||||
]
|
||||
}
|
||||
|
||||
rtc_source_set("rtc_task_queue") {
|
||||
|
||||
@ -17,8 +17,7 @@
|
||||
#include "rtc_base/base64.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "rtc_base/checks.h"
|
||||
#include <assert.h>
|
||||
|
||||
using std::vector;
|
||||
|
||||
@ -96,7 +95,7 @@ bool Base64::IsBase64Encoded(const std::string& str) {
|
||||
void Base64::EncodeFromArray(const void* data,
|
||||
size_t len,
|
||||
std::string* result) {
|
||||
RTC_DCHECK(nullptr != result);
|
||||
assert(nullptr != result);
|
||||
result->clear();
|
||||
result->resize(((len + 2) / 3) * 4);
|
||||
const unsigned char* byte_data = static_cast<const unsigned char*>(data);
|
||||
@ -224,15 +223,15 @@ bool Base64::DecodeFromArrayTemplate(const char* data,
|
||||
DecodeFlags flags,
|
||||
T* result,
|
||||
size_t* data_used) {
|
||||
RTC_DCHECK(nullptr != result);
|
||||
RTC_DCHECK(flags <= (DO_PARSE_MASK | DO_PAD_MASK | DO_TERM_MASK));
|
||||
assert(nullptr != result);
|
||||
assert(flags <= (DO_PARSE_MASK | DO_PAD_MASK | DO_TERM_MASK));
|
||||
|
||||
const DecodeFlags parse_flags = flags & DO_PARSE_MASK;
|
||||
const DecodeFlags pad_flags = flags & DO_PAD_MASK;
|
||||
const DecodeFlags term_flags = flags & DO_TERM_MASK;
|
||||
RTC_DCHECK(0 != parse_flags);
|
||||
RTC_DCHECK(0 != pad_flags);
|
||||
RTC_DCHECK(0 != term_flags);
|
||||
assert(0 != parse_flags);
|
||||
assert(0 != pad_flags);
|
||||
assert(0 != term_flags);
|
||||
|
||||
result->clear();
|
||||
result->reserve(len);
|
||||
|
||||
Reference in New Issue
Block a user