Skip to content

Commit 6812c97

Browse files
committed
Format All Files
1 parent 519c9db commit 6812c97

File tree

224 files changed

+17548
-14653
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

224 files changed

+17548
-14653
lines changed

activity.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ using namespace BinaryNinja;
55
using namespace std;
66

77

8-
Activity::Activity(const string& name, const std::function<void(Ref<AnalysisContext> analysisContext)>& action): m_action(action)
8+
Activity::Activity(const string& name, const std::function<void(Ref<AnalysisContext> analysisContext)>& action) :
9+
m_action(action)
910
{
10-
//LogError("API-Side Activity Constructed!");
11+
// LogError("API-Side Activity Constructed!");
1112
m_object = BNCreateActivity(name.c_str(), this, Run);
1213
}
1314

@@ -20,7 +21,7 @@ Activity::Activity(BNActivity* activity)
2021

2122
Activity::~Activity()
2223
{
23-
//LogError("API-Side Activity Destructed!");
24+
// LogError("API-Side Activity Destructed!");
2425
}
2526

2627

architecture.cpp

Lines changed: 101 additions & 88 deletions
Large diffs are not rendered by default.

basicblock.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,8 @@ void BasicBlock::SetAutoBasicBlockHighlight(BNHighlightStandardColor color, uint
354354
}
355355

356356

357-
void BasicBlock::SetAutoBasicBlockHighlight(BNHighlightStandardColor color, BNHighlightStandardColor mixColor,
358-
uint8_t mix, uint8_t alpha)
357+
void BasicBlock::SetAutoBasicBlockHighlight(
358+
BNHighlightStandardColor color, BNHighlightStandardColor mixColor, uint8_t mix, uint8_t alpha)
359359
{
360360
BNHighlightColor hc;
361361
hc.style = MixedHighlightColor;
@@ -406,8 +406,8 @@ void BasicBlock::SetUserBasicBlockHighlight(BNHighlightStandardColor color, uint
406406
}
407407

408408

409-
void BasicBlock::SetUserBasicBlockHighlight(BNHighlightStandardColor color, BNHighlightStandardColor mixColor,
410-
uint8_t mix, uint8_t alpha)
409+
void BasicBlock::SetUserBasicBlockHighlight(
410+
BNHighlightStandardColor color, BNHighlightStandardColor mixColor, uint8_t mix, uint8_t alpha)
411411
{
412412
BNHighlightColor hc;
413413
hc.style = MixedHighlightColor;

binaryninjaapi.cpp

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ string BinaryNinja::GetPathRelativeToUserDirectory(const string& rel)
173173

174174

175175
bool BinaryNinja::ExecuteWorkerProcess(const string& path, const vector<string>& args, const DataBuffer& input,
176-
string& output, string& errors, bool stdoutIsText, bool stderrIsText)
176+
string& output, string& errors, bool stdoutIsText, bool stderrIsText)
177177
{
178178
const char** argArray = new const char*[args.size() + 1];
179179
for (size_t i = 0; i < args.size(); i++)
@@ -182,8 +182,8 @@ bool BinaryNinja::ExecuteWorkerProcess(const string& path, const vector<string>&
182182

183183
char* outputStr;
184184
char* errorStr;
185-
bool result = BNExecuteWorkerProcess(path.c_str(), argArray, input.GetBufferObject(), &outputStr, &errorStr,
186-
stdoutIsText, stderrIsText);
185+
bool result = BNExecuteWorkerProcess(
186+
path.c_str(), argArray, input.GetBufferObject(), &outputStr, &errorStr, stdoutIsText, stderrIsText);
187187

188188
output = outputStr;
189189
errors = errorStr;
@@ -301,9 +301,7 @@ void BinaryNinja::WorkerEnqueue(RefCountObject* owner, const function<void()>& a
301301
context.owner = owner;
302302
context.func = action;
303303

304-
WorkerEnqueue([=]() {
305-
context.func();
306-
});
304+
WorkerEnqueue([=]() { context.func(); });
307305
}
308306

309307

@@ -325,9 +323,7 @@ void BinaryNinja::WorkerPriorityEnqueue(RefCountObject* owner, const function<vo
325323
context.owner = owner;
326324
context.func = action;
327325

328-
WorkerPriorityEnqueue([=]() {
329-
context.func();
330-
});
326+
WorkerPriorityEnqueue([=]() { context.func(); });
331327
}
332328

333329

@@ -349,9 +345,7 @@ void BinaryNinja::WorkerInteractiveEnqueue(RefCountObject* owner, const function
349345
context.owner = owner;
350346
context.func = action;
351347

352-
WorkerInteractiveEnqueue([=]() {
353-
context.func();
354-
});
348+
WorkerInteractiveEnqueue([=]() { context.func(); });
355349
}
356350

357351

@@ -389,23 +383,27 @@ map<string, uint64_t> BinaryNinja::GetMemoryUsageInfo()
389383
}
390384

391385

392-
std::function<bool(size_t, size_t)>
393-
BinaryNinja::SplitProgress(std::function<bool(size_t, size_t)> originalFn, size_t subpart, size_t subpartCount)
386+
std::function<bool(size_t, size_t)> BinaryNinja::SplitProgress(
387+
std::function<bool(size_t, size_t)> originalFn, size_t subpart, size_t subpartCount)
394388
{
395389
return SplitProgress(originalFn, subpart, std::vector<double>(subpartCount, 1.0 / (double)subpartCount));
396390
}
397391

398392

399-
std::function<bool(size_t, size_t)>
400-
BinaryNinja::SplitProgress(std::function<bool(size_t, size_t)> originalFn, size_t subpart, std::vector<double> subpartWeights)
393+
std::function<bool(size_t, size_t)> BinaryNinja::SplitProgress(
394+
std::function<bool(size_t, size_t)> originalFn, size_t subpart, std::vector<double> subpartWeights)
401395
{
402396
if (!originalFn)
403-
return [](size_t, size_t){ return true; };
397+
return [](size_t, size_t) {
398+
return true;
399+
};
404400

405401
// Normalize weights
406402
double weightSum = std::accumulate(subpartWeights.begin(), subpartWeights.end(), 0.0);
407403
if (weightSum < 0.0001f)
408-
return [](size_t, size_t){ return true; };
404+
return [](size_t, size_t) {
405+
return true;
406+
};
409407
// Keep a running count of weights for the start
410408
std::vector<double> subpartStarts;
411409
double start = 0.0;

0 commit comments

Comments
 (0)