@@ -173,7 +173,7 @@ string BinaryNinja::GetPathRelativeToUserDirectory(const string& rel)
173
173
174
174
175
175
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)
177
177
{
178
178
const char ** argArray = new const char *[args.size () + 1 ];
179
179
for (size_t i = 0 ; i < args.size (); i++)
@@ -182,8 +182,8 @@ bool BinaryNinja::ExecuteWorkerProcess(const string& path, const vector<string>&
182
182
183
183
char * outputStr;
184
184
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);
187
187
188
188
output = outputStr;
189
189
errors = errorStr;
@@ -301,9 +301,7 @@ void BinaryNinja::WorkerEnqueue(RefCountObject* owner, const function<void()>& a
301
301
context.owner = owner;
302
302
context.func = action;
303
303
304
- WorkerEnqueue ([=]() {
305
- context.func ();
306
- });
304
+ WorkerEnqueue ([=]() { context.func (); });
307
305
}
308
306
309
307
@@ -325,9 +323,7 @@ void BinaryNinja::WorkerPriorityEnqueue(RefCountObject* owner, const function<vo
325
323
context.owner = owner;
326
324
context.func = action;
327
325
328
- WorkerPriorityEnqueue ([=]() {
329
- context.func ();
330
- });
326
+ WorkerPriorityEnqueue ([=]() { context.func (); });
331
327
}
332
328
333
329
@@ -349,9 +345,7 @@ void BinaryNinja::WorkerInteractiveEnqueue(RefCountObject* owner, const function
349
345
context.owner = owner;
350
346
context.func = action;
351
347
352
- WorkerInteractiveEnqueue ([=]() {
353
- context.func ();
354
- });
348
+ WorkerInteractiveEnqueue ([=]() { context.func (); });
355
349
}
356
350
357
351
@@ -389,23 +383,27 @@ map<string, uint64_t> BinaryNinja::GetMemoryUsageInfo()
389
383
}
390
384
391
385
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)
394
388
{
395
389
return SplitProgress (originalFn, subpart, std::vector<double >(subpartCount, 1.0 / (double )subpartCount));
396
390
}
397
391
398
392
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)
401
395
{
402
396
if (!originalFn)
403
- return [](size_t , size_t ){ return true ; };
397
+ return [](size_t , size_t ) {
398
+ return true ;
399
+ };
404
400
405
401
// Normalize weights
406
402
double weightSum = std::accumulate (subpartWeights.begin (), subpartWeights.end (), 0.0 );
407
403
if (weightSum < 0 .0001f )
408
- return [](size_t , size_t ){ return true ; };
404
+ return [](size_t , size_t ) {
405
+ return true ;
406
+ };
409
407
// Keep a running count of weights for the start
410
408
std::vector<double > subpartStarts;
411
409
double start = 0.0 ;
0 commit comments