Style: Format code with clang-format 6.0.1
(cherry picked from commit7c9f7452f4
) Travis: Update style checks to clang-format 6.0.1 (cherry picked from commit003ac67df1
)
This commit is contained in:
parent
d859aa1438
commit
c709dff1a2
|
@ -1,6 +1,6 @@
|
|||
# Commented out parameters are those with the same value as base LLVM style
|
||||
# We can uncomment them if we want to change their value, or enforce the
|
||||
# chosen value in case the base style changes (last sync: Clang 5.0.0).
|
||||
# chosen value in case the base style changes (last sync: Clang 6.0.1).
|
||||
---
|
||||
### General config, applies to all languages ###
|
||||
BasedOnStyle: LLVM
|
||||
|
@ -32,6 +32,7 @@ AllowShortIfStatementsOnASingleLine: true
|
|||
# AfterObjCDeclaration: false
|
||||
# AfterStruct: false
|
||||
# AfterUnion: false
|
||||
# AfterExternBlock: false
|
||||
# BeforeCatch: false
|
||||
# BeforeElse: false
|
||||
# IndentBraces: false
|
||||
|
@ -60,6 +61,7 @@ Cpp11BracedListStyle: false
|
|||
# - foreach
|
||||
# - Q_FOREACH
|
||||
# - BOOST_FOREACH
|
||||
# IncludeBlocks: Preserve
|
||||
IncludeCategories:
|
||||
- Regex: '".*"'
|
||||
Priority: 1
|
||||
|
@ -69,6 +71,7 @@ IncludeCategories:
|
|||
Priority: 3
|
||||
# IncludeIsMainRegex: '(Test)?$'
|
||||
IndentCaseLabels: true
|
||||
# IndentPPDirectives: None
|
||||
IndentWidth: 4
|
||||
# IndentWrappedFunctionNames: false
|
||||
# JavaScriptQuotes: Leave
|
||||
|
@ -86,6 +89,10 @@ IndentWidth: 4
|
|||
# PenaltyExcessCharacter: 1000000
|
||||
# PenaltyReturnTypeOnItsOwnLine: 60
|
||||
# PointerAlignment: Right
|
||||
# RawStringFormats:
|
||||
# - Delimiter: pb
|
||||
# Language: TextProto
|
||||
# BasedOnStyle: google
|
||||
# ReflowComments: true
|
||||
# SortIncludes: true
|
||||
# SortUsingDeclarations: true
|
||||
|
|
|
@ -44,7 +44,7 @@ addons:
|
|||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-5.0
|
||||
- llvm-toolchain-trusty-6.0
|
||||
packages:
|
||||
- build-essential
|
||||
- scons
|
||||
|
@ -70,7 +70,7 @@ addons:
|
|||
#- mingw-w64
|
||||
|
||||
# For style checks.
|
||||
- clang-format-5.0
|
||||
- clang-format-6.0
|
||||
|
||||
install:
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$GODOT_TARGET" = "android" ]; then
|
||||
|
|
|
@ -880,4 +880,4 @@ Dictionary mono_object_to_Dictionary(MonoObject *p_dict) {
|
|||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
} // namespace GDMonoMarshal
|
||||
|
|
|
@ -42,7 +42,8 @@ void AudioDriverOpenSL::_buffer_callback(
|
|||
/* SLuint32 eventFlags,
|
||||
const void * pBuffer,
|
||||
SLuint32 bufferSize,
|
||||
SLuint32 dataUsed*/) {
|
||||
SLuint32 dataUsed*/
|
||||
) {
|
||||
|
||||
bool mix = true;
|
||||
|
||||
|
|
|
@ -74,7 +74,8 @@ class AudioDriverOpenSL : public AudioDriver {
|
|||
/* SLuint32 eventFlags,
|
||||
const void * pBuffer,
|
||||
SLuint32 bufferSize,
|
||||
SLuint32 dataUsed*/);
|
||||
SLuint32 dataUsed*/
|
||||
);
|
||||
|
||||
static void _buffer_callbacks(
|
||||
SLAndroidSimpleBufferQueueItf queueItf,
|
||||
|
|
|
@ -66,7 +66,6 @@ abstract public class ConsumeTask {
|
|||
}
|
||||
final String token = _token;
|
||||
new AsyncTask<String, String, String>() {
|
||||
|
||||
@Override
|
||||
protected String doInBackground(String... params) {
|
||||
try {
|
||||
|
@ -89,7 +88,6 @@ abstract public class ConsumeTask {
|
|||
error(param);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.execute();
|
||||
}
|
||||
|
|
|
@ -103,7 +103,6 @@ public class PaymentsManager {
|
|||
|
||||
public void requestPurchase(final String sku, String transactionId) {
|
||||
new PurchaseTask(mService, Godot.getInstance()) {
|
||||
|
||||
@Override
|
||||
protected void error(String message) {
|
||||
godotPaymentV3.callbackFail();
|
||||
|
@ -118,14 +117,12 @@ public class PaymentsManager {
|
|||
protected void alreadyOwned() {
|
||||
godotPaymentV3.callbackAlreadyOwned(sku);
|
||||
}
|
||||
|
||||
}
|
||||
.purchase(sku, transactionId);
|
||||
}
|
||||
|
||||
public void consumeUnconsumedPurchases() {
|
||||
new ReleaseAllConsumablesTask(mService, activity) {
|
||||
|
||||
@Override
|
||||
protected void success(String sku, String receipt, String signature, String token) {
|
||||
godotPaymentV3.callbackSuccessProductMassConsumed(receipt, signature, sku);
|
||||
|
@ -194,14 +191,12 @@ public class PaymentsManager {
|
|||
|
||||
public void processPurchaseResponse(int resultCode, Intent data) {
|
||||
new HandlePurchaseTask(activity) {
|
||||
|
||||
@Override
|
||||
protected void success(final String sku, final String signature, final String ticket) {
|
||||
godotPaymentV3.callbackSuccess(ticket, signature, sku);
|
||||
|
||||
if (auto_consume) {
|
||||
new ConsumeTask(mService, activity) {
|
||||
|
||||
@Override
|
||||
protected void success(String ticket) {
|
||||
}
|
||||
|
@ -231,12 +226,10 @@ public class PaymentsManager {
|
|||
public void validatePurchase(String purchaseToken, final String sku) {
|
||||
|
||||
new ValidateTask(activity, godotPaymentV3) {
|
||||
|
||||
@Override
|
||||
protected void success() {
|
||||
|
||||
new ConsumeTask(mService, activity) {
|
||||
|
||||
@Override
|
||||
protected void success(String ticket) {
|
||||
godotPaymentV3.callbackSuccess(ticket, null, sku);
|
||||
|
@ -269,7 +262,6 @@ public class PaymentsManager {
|
|||
|
||||
public void consume(final String sku) {
|
||||
new ConsumeTask(mService, activity) {
|
||||
|
||||
@Override
|
||||
protected void success(String ticket) {
|
||||
godotPaymentV3.callbackSuccessProductMassConsumed(ticket, "", sku);
|
||||
|
|
|
@ -88,7 +88,6 @@ abstract public class ReleaseAllConsumablesTask {
|
|||
String signature = mySignatures.get(i);
|
||||
//Log.d("godot", "A punto de consumir un item con token:" + token + "\n" + receipt);
|
||||
new GenericConsumeTask(context, mService, sku, receipt, signature, token) {
|
||||
|
||||
@Override
|
||||
public void onSuccess(String sku, String receipt, String signature, String token) {
|
||||
ReleaseAllConsumablesTask.this.success(sku, receipt, signature, token);
|
||||
|
|
|
@ -63,7 +63,6 @@ abstract public class ValidateTask {
|
|||
|
||||
public void validatePurchase(final String sku) {
|
||||
new AsyncTask<String, String, String>() {
|
||||
|
||||
private ProgressDialog dialog;
|
||||
|
||||
@Override
|
||||
|
@ -113,7 +112,6 @@ abstract public class ValidateTask {
|
|||
error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.execute();
|
||||
}
|
||||
|
|
|
@ -139,7 +139,6 @@ Error GameCenter::post_score(Variant p_score) {
|
|||
|
||||
[GKScore reportScores:@[ reporter ]
|
||||
withCompletionHandler:^(NSError *error) {
|
||||
|
||||
Dictionary ret;
|
||||
ret["type"] = "post_score";
|
||||
if (error == nil) {
|
||||
|
@ -177,7 +176,6 @@ Error GameCenter::award_achievement(Variant p_params) {
|
|||
|
||||
[GKAchievement reportAchievements:@[ achievement ]
|
||||
withCompletionHandler:^(NSError *error) {
|
||||
|
||||
Dictionary ret;
|
||||
ret["type"] = "award_achievement";
|
||||
if (error == nil) {
|
||||
|
@ -196,7 +194,6 @@ Error GameCenter::award_achievement(Variant p_params) {
|
|||
void GameCenter::request_achievement_descriptions() {
|
||||
|
||||
[GKAchievementDescription loadAchievementDescriptionsWithCompletionHandler:^(NSArray *descriptions, NSError *error) {
|
||||
|
||||
Dictionary ret;
|
||||
ret["type"] = "achievement_descriptions";
|
||||
if (error == nil) {
|
||||
|
@ -252,7 +249,6 @@ void GameCenter::request_achievement_descriptions() {
|
|||
void GameCenter::request_achievements() {
|
||||
|
||||
[GKAchievement loadAchievementsWithCompletionHandler:^(NSArray *achievements, NSError *error) {
|
||||
|
||||
Dictionary ret;
|
||||
ret["type"] = "achievements";
|
||||
if (error == nil) {
|
||||
|
@ -347,7 +343,6 @@ Error GameCenter::request_identity_verification_signature() {
|
|||
|
||||
GKLocalPlayer *player = [GKLocalPlayer localPlayer];
|
||||
[player generateIdentityVerificationSignatureWithCompletionHandler:^(NSURL *publicKeyUrl, NSData *signature, NSData *salt, uint64_t timestamp, NSError *error) {
|
||||
|
||||
Dictionary ret;
|
||||
ret["type"] = "identity_verification_signature";
|
||||
if (error == nil) {
|
||||
|
|
|
@ -392,7 +392,6 @@ void OSUWP::ManagedType::update_clipboard() {
|
|||
if (data->Contains(StandardDataFormats::Text)) {
|
||||
|
||||
create_task(data->GetTextAsync()).then([this](Platform::String ^ clipboard_content) {
|
||||
|
||||
this->clipboard = clipboard_content;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue