Skip to content

Commit 7437355

Browse files
committed
Let's not make it do this way
1 parent aacf0cb commit 7437355

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Language: Cpp
33
# BasedOnStyle: LLVM
44
AccessModifierOffset: -4
5-
AlignAfterOpenBracket: Align
5+
AlignAfterOpenBracket: DontAlign
66
AlignConsecutiveMacros: false
77
AlignConsecutiveAssignments: false
88
AlignConsecutiveDeclarations: false

Source/System/PathFinder.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -211,23 +211,23 @@ std::shared_ptr<volatile PathRequest> PathFinder::CalculatePathAsync(Vector star
211211
const_cast<Vector&>(pathRequest->targetPos) = end;
212212

213213
g_ThreadMan.GetBackgroundThreadPool().push_task(
214-
[this, start, end, digStrength, callback](std::shared_ptr<volatile PathRequest> volRequest) {
215-
// Cast away the volatile-ness - only matters outside (and complicates the API otherwise)
216-
PathRequest& request = const_cast<PathRequest&>(*volRequest);
214+
[this, start, end, digStrength, callback](std::shared_ptr<volatile PathRequest> volRequest) {
215+
// Cast away the volatile-ness - only matters outside (and complicates the API otherwise)
216+
PathRequest& request = const_cast<PathRequest&>(*volRequest);
217217

218-
int status = this->CalculatePath(start, end, request.path, request.totalCost, digStrength);
218+
int status = this->CalculatePath(start, end, request.path, request.totalCost, digStrength);
219219

220-
request.status = status;
221-
request.pathLength = request.path.size();
220+
request.status = status;
221+
request.pathLength = request.path.size();
222222

223-
if (callback) {
224-
callback(volRequest);
225-
}
223+
if (callback) {
224+
callback(volRequest);
225+
}
226226

227-
// Have to set to complete after the callback, so anything that blocks on it knows that the callback will have been called by now
228-
// This has the awkward side-effect that the complete flag is actually false during the callback - but that's fine, if it's called we know it's complete anyways
229-
request.complete = true;
230-
},
227+
// Have to set to complete after the callback, so anything that blocks on it knows that the callback will have been called by now
228+
// This has the awkward side-effect that the complete flag is actually false during the callback - but that's fine, if it's called we know it's complete anyways
229+
request.complete = true;
230+
},
231231
pathRequest);
232232

233233
return pathRequest;

0 commit comments

Comments
 (0)