Revert of Consolidate constructormagic macros with Chromium version and remove Chromium override. (patchset #4 id:60001 of https://codereview.webrtc.org/1316363005/ )
Reason for revert: Had to revert since FYI bots stopped compiling. Example failure: [94/9470] CXX obj\third_party\webrtc\modules\video_processing\main\source\video_processing_sse2.content_analysis_sse2.obj FAILED: ninja -t msvc -e environment.x86 -- E:\b\build\goma/gomacc "E:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\third_party\webrtc\modules\video_coding\codecs\h264\webrtc_h264.h264.obj.rsp /c ..\..\third_party\webrtc\modules\video_coding\codecs\h264\h264.cc /Foobj\third_party\webrtc\modules\video_coding\codecs\h264\webrtc_h264.h264.obj /Fdobj\third_party\webrtc\modules\webrtc_h264.cc.pdb e:\b\build\slave\win\build\src\base\macros.h(28) : error C2220: warning treated as error - no 'object' file generated e:\b\build\slave\win\build\src\base\macros.h(28) : warning C4005: 'DISALLOW_COPY_AND_ASSIGN' : macro redefinition e:\b\build\slave\win\build\src\third_party\webrtc\base\constructormagic.h(27) : see previous definition of 'DISALLOW_COPY_AND_ASSIGN' FAILED: ninja -t msvc -e environment.x86 -- E:\b\build\goma/gomacc "E:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\third_party\webrtc\base\rtc_base_approved.bitbuffer.obj.rsp /c ..\..\third_party\webrtc\base\bitbuffer.cc /Foobj\third_party\webrtc\base\rtc_base_approved.bitbuffer.obj /Fdobj\third_party\webrtc\base\rtc_base_approved.cc.pdb e:\b\build\slave\win\build\src\base\macros.h(28) : error C2220: warning treated as error - no 'object' file generated e:\b\build\slave\win\build\src\base\macros.h(28) : warning C4005: 'DISALLOW_COPY_AND_ASSIGN' : macro redefinition e:\b\build\slave\win\build\src\third_party\webrtc\base\constructormagic.h(27) : see previous definition of 'DISALLOW_COPY_AND_ASSIGN' FAILED: ninja -t msvc -e environment.x86 -- E:\b\build\goma/gomacc "E:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\third_party\webrtc\modules\audio_processing\logging\audio_processing.aec_logging_file_handling.obj.rsp /c ..\..\third_party\webrtc\modules\audio_processing\logging\aec_logging_file_handling.cc /Foobj\third_party\webrtc\modules\audio_processing\logging\audio_processing.aec_logging_file_handling.obj /Fdobj\third_party\webrtc\modules\audio_processing.cc.pdb e:\b\build\slave\win\build\src\base\macros.h(28) : error C2220: warning treated as error - no 'object' file generated e:\b\build\slave\win\build\src\base\macros.h(28) : warning C4005: 'DISALLOW_COPY_AND_ASSIGN' : macro redefinition e:\b\build\slave\win\build\src\third_party\webrtc\base\constructormagic.h(27) : see previous definition of 'DISALLOW_COPY_AND_ASSIGN' FAILED: ninja -t msvc -e environment.x86 -- E:\b\build\goma/gomacc "E:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\third_party\webrtc\modules\audio_processing\beamformer\audio_processing.nonlinear_beamformer.obj.rsp /c ..\..\third_party\webrtc\modules\audio_processing\beamformer\nonlinear_beamformer.cc /Foobj\third_party\webrtc\modules\audio_processing\beamformer\audio_processing.nonlinear_beamformer.obj /Fdobj\third_party\webrtc\modules\audio_processing.cc.pdb e:\b\build\slave\win\build\src\base\macros.h(28) : error C2220: warning treated as error - no 'object' file generated e:\b\build\slave\win\build\src\base\macros.h(28) : warning C4005: 'DISALLOW_COPY_AND_ASSIGN' : macro redefinition e:\b\build\slave\win\build\src\third_party\webrtc\base\constructormagic.h(27) : see previous definition of 'DISALLOW_COPY_AND_ASSIGN' Original issue's description: > Consolidate constructormagic macros with Chromium version and remove Chromium override. > > Part of work removing dependency on Chromium's base. > > Only adds "= delete". From https://codereview.chromium.org/1151443003 : > "This will guarantee the error to be at compile time, and not rely on the call visibility (private)." > > In consequence of that change, fixed an illegal copy and removed a bunch of unused variables. > > BUG=chromium:468375 (in particular comment #37) > NOTRY=true > > Committed: https://crrev.com/0de8ff488d92e0bc6b7b65662898ff5e955cda93 > Cr-Commit-Position: refs/heads/master@{#9913} TBR=andrew@webrtc.org,henrikg@webrtc.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=chromium:468375 (in particular comment #37) Review URL: https://codereview.webrtc.org/1330283002 Cr-Commit-Position: refs/heads/master@{#9914}
This commit is contained in:
@ -318,6 +318,8 @@ class FrameInputWrapper : public cricket::VideoRenderer {
|
||||
|
||||
private:
|
||||
cricket::VideoCapturer* capturer_;
|
||||
int width_;
|
||||
int height_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(FrameInputWrapper);
|
||||
};
|
||||
|
@ -14,27 +14,27 @@
|
||||
// Undefine macros first, just in case. Some third-party includes have their own
|
||||
// version.
|
||||
|
||||
// Put this in the declarations for a class to be unassignable.
|
||||
#undef DISALLOW_ASSIGN
|
||||
#define DISALLOW_ASSIGN(TypeName) \
|
||||
void operator=(const TypeName&) = delete
|
||||
void operator=(const TypeName&)
|
||||
|
||||
// A macro to disallow the copy constructor and operator= functions. This should
|
||||
// be used in the declarations for a class.
|
||||
// A macro to disallow the evil copy constructor and operator= functions
|
||||
// This should be used in the private: declarations for a class.
|
||||
#undef DISALLOW_COPY_AND_ASSIGN
|
||||
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
|
||||
TypeName(const TypeName&) = delete; \
|
||||
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
|
||||
TypeName(const TypeName&); \
|
||||
DISALLOW_ASSIGN(TypeName)
|
||||
|
||||
// A macro to disallow all the implicit constructors, namely the default
|
||||
// constructor, copy constructor and operator= functions.
|
||||
// A macro to disallow all the implicit constructors, namely the
|
||||
// default constructor, copy constructor and operator= functions.
|
||||
//
|
||||
// This should be used in the declarations for a class that wants to prevent
|
||||
// anyone from instantiating it. This is especially useful for classes
|
||||
// containing only static methods.
|
||||
// This should be used in the private: declarations for a class
|
||||
// that wants to prevent anyone from instantiating it. This is
|
||||
// especially useful for classes containing only static methods.
|
||||
#undef DISALLOW_IMPLICIT_CONSTRUCTORS
|
||||
#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
|
||||
TypeName() = delete; \
|
||||
TypeName(); \
|
||||
DISALLOW_COPY_AND_ASSIGN(TypeName)
|
||||
|
||||
|
||||
#endif // WEBRTC_BASE_CONSTRUCTORMAGIC_H_
|
||||
|
@ -195,7 +195,8 @@ LogMessage::~LogMessage() {
|
||||
}
|
||||
uint32 delay = TimeSince(before);
|
||||
if (delay >= warn_slow_logs_delay_) {
|
||||
rtc::LogMessage slow_log_warning(__FILE__, __LINE__, LS_WARNING);
|
||||
LogMessage slow_log_warning =
|
||||
rtc::LogMessage(__FILE__, __LINE__, LS_WARNING);
|
||||
// If our warning is slow, we don't want to warn about it, because
|
||||
// that would lead to inifinite recursion. So, give a really big
|
||||
// number for the delay threshold.
|
||||
|
@ -109,6 +109,7 @@ class NATServer : public sigslot::has_slots<> {
|
||||
bool ShouldFilterOut(TransEntry* entry, const SocketAddress& ext_addr);
|
||||
|
||||
NAT* nat_;
|
||||
SocketFactory* internal_;
|
||||
SocketFactory* external_;
|
||||
SocketAddress external_ip_;
|
||||
AsyncUDPSocket* udp_server_socket_;
|
||||
|
@ -98,6 +98,7 @@ VirtualSocket::VirtualSocket(VirtualSocketServer* server,
|
||||
int type,
|
||||
bool async)
|
||||
: server_(server),
|
||||
family_(family),
|
||||
type_(type),
|
||||
async_(async),
|
||||
state_(CS_CLOSED),
|
||||
|
@ -306,6 +306,7 @@ class VirtualSocket : public AsyncSocket, public MessageHandler {
|
||||
void SetLocalAddress(const SocketAddress& addr);
|
||||
|
||||
VirtualSocketServer* server_;
|
||||
int family_;
|
||||
int type_;
|
||||
bool async_;
|
||||
ConnState state_;
|
||||
|
@ -719,7 +719,8 @@ VideoSource::VideoSource(int flow_id,
|
||||
next_frame_ms_(first_frame_offset_ms),
|
||||
next_frame_rand_ms_(0),
|
||||
now_ms_(0),
|
||||
prototype_header_() {
|
||||
prototype_header_(),
|
||||
start_plotting_ms_(first_frame_offset_ms) {
|
||||
memset(&prototype_header_, 0, sizeof(prototype_header_));
|
||||
prototype_header_.ssrc = ssrc;
|
||||
prototype_header_.sequenceNumber = 0xf000u;
|
||||
|
@ -370,6 +370,7 @@ class ChokeFilter : public PacketProcessor {
|
||||
uint32_t capacity_kbps_;
|
||||
int64_t last_send_time_us_;
|
||||
rtc::scoped_ptr<DelayCapHelper> delay_cap_helper_;
|
||||
int64_t max_delay_us_;
|
||||
|
||||
DISALLOW_IMPLICIT_CONSTRUCTORS(ChokeFilter);
|
||||
};
|
||||
@ -446,6 +447,8 @@ class VideoSource {
|
||||
int64_t next_frame_rand_ms_;
|
||||
int64_t now_ms_;
|
||||
RTPHeader prototype_header_;
|
||||
int64_t start_plotting_ms_;
|
||||
uint32_t previous_bitrate_bps_;
|
||||
|
||||
DISALLOW_IMPLICIT_CONSTRUCTORS(VideoSource);
|
||||
};
|
||||
|
@ -153,7 +153,8 @@ RtpPacketizerH264::RtpPacketizerH264(FrameType frame_type,
|
||||
size_t max_payload_len)
|
||||
: payload_data_(NULL),
|
||||
payload_size_(0),
|
||||
max_payload_len_(max_payload_len) {
|
||||
max_payload_len_(max_payload_len),
|
||||
frame_type_(frame_type) {
|
||||
}
|
||||
|
||||
RtpPacketizerH264::~RtpPacketizerH264() {
|
||||
|
@ -84,6 +84,7 @@ class RtpPacketizerH264 : public RtpPacketizer {
|
||||
const size_t max_payload_len_;
|
||||
RTPFragmentationHeader fragmentation_;
|
||||
PacketQueue packets_;
|
||||
FrameType frame_type_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(RtpPacketizerH264);
|
||||
};
|
||||
|
@ -61,6 +61,7 @@ class FileOutputFrameReceiver : public webrtc::VCMReceiveCallback {
|
||||
|
||||
private:
|
||||
std::string out_filename_;
|
||||
uint32_t ssrc_;
|
||||
FILE* out_file_;
|
||||
FILE* timing_file_;
|
||||
int width_;
|
||||
|
20
webrtc/overrides/webrtc/base/constructormagic.h
Normal file
20
webrtc/overrides/webrtc/base/constructormagic.h
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright 2009 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 overrides the inclusion of webrtc/base/constructormagic.h
|
||||
// We do this because constructor magic defines DISALLOW_COPY_AND_ASSIGN,
|
||||
// but we want to use the version from Chromium.
|
||||
|
||||
#ifndef OVERRIDES_WEBRTC_BASE_CONSTRUCTORMAGIC_H__
|
||||
#define OVERRIDES_WEBRTC_BASE_CONSTRUCTORMAGIC_H__
|
||||
|
||||
#include "base/macros.h"
|
||||
|
||||
#endif // OVERRIDES_WEBRTC_BASE_CONSTRUCTORMAGIC_H__
|
Reference in New Issue
Block a user