mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Apply clang-format to all C, C++ and ObjC files (issue #2171)
This commit is contained in:
@@ -9,12 +9,13 @@
|
||||
// implementations. See the translator.README.txt file in the tools directory
|
||||
// for more information.
|
||||
//
|
||||
// $hash=62ea8e5f3c69adcb7cce5105e55bbca12373e533$
|
||||
//
|
||||
|
||||
#include <algorithm>
|
||||
#include "libcef_dll/ctocpp/post_data_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/post_data_element_ctocpp.h"
|
||||
|
||||
|
||||
// STATIC METHODS - Body may be edited by hand.
|
||||
|
||||
CefRefPtr<CefPostData> CefPostData::Create() {
|
||||
@@ -27,7 +28,6 @@ CefRefPtr<CefPostData> CefPostData::Create() {
|
||||
return CefPostDataCToCpp::Wrap(_retval);
|
||||
}
|
||||
|
||||
|
||||
// VIRTUAL METHODS - Body may be edited by hand.
|
||||
|
||||
bool CefPostDataCToCpp::IsReadOnly() {
|
||||
@@ -41,7 +41,7 @@ bool CefPostDataCToCpp::IsReadOnly() {
|
||||
int _retval = _struct->is_read_only(_struct);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
bool CefPostDataCToCpp::HasExcludedElements() {
|
||||
@@ -55,7 +55,7 @@ bool CefPostDataCToCpp::HasExcludedElements() {
|
||||
int _retval = _struct->has_excluded_elements(_struct);
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
size_t CefPostDataCToCpp::GetElementCount() {
|
||||
@@ -87,7 +87,7 @@ void CefPostDataCToCpp::GetElements(ElementVector& elements) {
|
||||
elementsList = new cef_post_data_element_t*[elementsCount];
|
||||
DCHECK(elementsList);
|
||||
if (elementsList) {
|
||||
memset(elementsList, 0, sizeof(cef_post_data_element_t*)*elementsCount);
|
||||
memset(elementsList, 0, sizeof(cef_post_data_element_t*) * elementsCount);
|
||||
}
|
||||
if (elementsList && elementsSize > 0) {
|
||||
for (size_t i = 0; i < elementsSize; ++i) {
|
||||
@@ -97,9 +97,7 @@ void CefPostDataCToCpp::GetElements(ElementVector& elements) {
|
||||
}
|
||||
|
||||
// Execute
|
||||
_struct->get_elements(_struct,
|
||||
&elementsCount,
|
||||
elementsList);
|
||||
_struct->get_elements(_struct, &elementsCount, elementsList);
|
||||
|
||||
// Restore param:elements; type: refptr_vec_same_byref
|
||||
elements.clear();
|
||||
@@ -107,7 +105,7 @@ void CefPostDataCToCpp::GetElements(ElementVector& elements) {
|
||||
for (size_t i = 0; i < elementsCount; ++i) {
|
||||
elements.push_back(CefPostDataElementCToCpp::Wrap(elementsList[i]));
|
||||
}
|
||||
delete [] elementsList;
|
||||
delete[] elementsList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,11 +122,11 @@ bool CefPostDataCToCpp::RemoveElement(CefRefPtr<CefPostDataElement> element) {
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->remove_element(_struct,
|
||||
CefPostDataElementCToCpp::Unwrap(element));
|
||||
int _retval = _struct->remove_element(
|
||||
_struct, CefPostDataElementCToCpp::Unwrap(element));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
bool CefPostDataCToCpp::AddElement(CefRefPtr<CefPostDataElement> element) {
|
||||
@@ -144,11 +142,11 @@ bool CefPostDataCToCpp::AddElement(CefRefPtr<CefPostDataElement> element) {
|
||||
return false;
|
||||
|
||||
// Execute
|
||||
int _retval = _struct->add_element(_struct,
|
||||
CefPostDataElementCToCpp::Unwrap(element));
|
||||
int _retval =
|
||||
_struct->add_element(_struct, CefPostDataElementCToCpp::Unwrap(element));
|
||||
|
||||
// Return type: bool
|
||||
return _retval?true:false;
|
||||
return _retval ? true : false;
|
||||
}
|
||||
|
||||
void CefPostDataCToCpp::RemoveElements() {
|
||||
@@ -162,22 +160,27 @@ void CefPostDataCToCpp::RemoveElements() {
|
||||
_struct->remove_elements(_struct);
|
||||
}
|
||||
|
||||
|
||||
// CONSTRUCTOR - Do not edit by hand.
|
||||
|
||||
CefPostDataCToCpp::CefPostDataCToCpp() {
|
||||
}
|
||||
CefPostDataCToCpp::CefPostDataCToCpp() {}
|
||||
|
||||
template<> cef_post_data_t* CefCToCppRefCounted<CefPostDataCToCpp, CefPostData,
|
||||
cef_post_data_t>::UnwrapDerived(CefWrapperType type, CefPostData* c) {
|
||||
template <>
|
||||
cef_post_data_t*
|
||||
CefCToCppRefCounted<CefPostDataCToCpp, CefPostData, cef_post_data_t>::
|
||||
UnwrapDerived(CefWrapperType type, CefPostData* c) {
|
||||
NOTREACHED() << "Unexpected class type: " << type;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if DCHECK_IS_ON()
|
||||
template<> base::AtomicRefCount CefCToCppRefCounted<CefPostDataCToCpp,
|
||||
CefPostData, cef_post_data_t>::DebugObjCt = 0;
|
||||
template <>
|
||||
base::AtomicRefCount CefCToCppRefCounted<CefPostDataCToCpp,
|
||||
CefPostData,
|
||||
cef_post_data_t>::DebugObjCt = 0;
|
||||
#endif
|
||||
|
||||
template<> CefWrapperType CefCToCppRefCounted<CefPostDataCToCpp, CefPostData,
|
||||
cef_post_data_t>::kWrapperType = WT_POST_DATA;
|
||||
template <>
|
||||
CefWrapperType CefCToCppRefCounted<CefPostDataCToCpp,
|
||||
CefPostData,
|
||||
cef_post_data_t>::kWrapperType =
|
||||
WT_POST_DATA;
|
||||
|
Reference in New Issue
Block a user