Skip to content

Commit 1a6aebd

Browse files
fixed some whitespace issues
1 parent 65ecc97 commit 1a6aebd

18 files changed

+60
-60
lines changed

blobstamper/dict.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
******************************************************************************/
1818

19-
#include"dict.h"
19+
#include "dict.h"
2020

2121

2222
size_t

blobstamper/dict.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
#define DICT_H
2121

2222

23-
#include<string>
24-
#include<vector>
23+
#include <string>
24+
#include <vector>
2525

2626

2727
class DictBase
@@ -31,10 +31,10 @@ class DictBase
3131
public:
3232
size_t size();
3333
std::string get(size_t n); // FIXME May be it would be good to use operator[] later.
34-
DictBase() {data = {};};
34+
DictBase() { data = {}; };
3535
};
3636

37-
class DictLCAlphaSmall : public DictBase
37+
class DictLCAlphaSmall: public DictBase
3838
{
3939
public:
4040
DictLCAlphaSmall();

blobstamper/galley.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ GalleySetBase::minSize()
427427
if (unbounded_count > 1) /* One unbounded stamp will take all data. Nothing to predict */
428428
res += ORACLE_SIZE * unbounded_count;
429429

430-
return res;
430+
return res;
431431
}
432432

433433
int

blobstamper/galley.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ GalleyVectorV<T>::ExtractValuesVector(std::shared_ptr<Blob> blob)
8181
std::vector<std::shared_ptr<Blob>> blobs = extract_internal(blob);
8282
std::vector<T> res(blobs.size());
8383

84-
for(int i=0; i<blobs.size(); i++)
84+
for (int i = 0; i < blobs.size(); i++)
8585
{
8686
res[i] = std::dynamic_pointer_cast<StampBaseV<T>>(stamp)->ExtractValue(blobs[i]);
8787
}

blobstamper/oracle.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ OracleProportion(ORACLE_TYPE oracle, size_t min, size_t max)
3131
* хвоста диапазона предсказания не попасть никогда и тогда он не округлиться
3232
* в max + 1*/
3333
size_t delta = max - min + 1;
34-
size_t res = floor(((float) oracle) / ((float) ORACLE_MAX + 1) * delta );
34+
size_t res = floor(((float) oracle) / ((float) ORACLE_MAX + 1) * delta);
3535
return min + res;
3636
}
3737

blobstamper/stamp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ StampBase::Load(std::shared_ptr<Blob> blob)
4343
{
4444
res_size = maxSize();
4545
if (res_size > blob->Size())
46-
res_size = blob->Size();
46+
res_size = blob->Size();
4747
}
4848
bitten_blob = blob->Chop(res_size);
4949
}

blobstamper/stamp.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ class StampBase
4040

4141
void Load(std::shared_ptr<Blob> blob);
4242

43-
bool isFixedSize() {return minSize() == maxSize();}
44-
bool isVariated() {return ! isFixedSize() && ! isUnbounded();}
45-
bool isUnbounded() {return maxSize() == -1;}
43+
bool isFixedSize() { return minSize() == maxSize(); }
44+
bool isVariated() { return !isFixedSize() && !isUnbounded(); }
45+
bool isUnbounded() { return maxSize() == -1; }
4646
virtual bool isRecursive() {return is_recursive;}
4747
};
4848

@@ -90,8 +90,8 @@ StampBasePV<T>::ExtractBin(std::shared_ptr<Blob> blob)
9090
return v;
9191
}
9292

93-
template<class T> class StampBaseV: public StampBasePV<T>
94-
,public virtual StampBase //FIXME I do not understand why do we need it here, but wihtout it, it does not build
93+
template<class T> class StampBaseV: public StampBasePV<T>,
94+
public virtual StampBase //FIXME I do not understand why do we need it here, but wihtout it, it does not build
9595
{
9696
public:
9797
virtual T ExtractValue(std::shared_ptr<Blob> blob) = 0;/* Should be defined by derived classes*/

blobstamper/stamp_dict.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@
2424
int
2525
StampDict::ChooseStampSize(std::shared_ptr<DictBase> dict)
2626
{
27-
if (dict->size() <= UCHAR_MAX+1)
27+
if (dict->size() <= UCHAR_MAX + 1)
2828
{
2929
stamp_max_value = UCHAR_MAX;
3030
return 1;
3131
}
32-
if (dict->size() <= USHRT_MAX+1)
32+
if (dict->size() <= USHRT_MAX + 1)
3333
{
3434
stamp_max_value = USHRT_MAX;
3535
return 2;
3636
}
37-
if (dict->size() <= UINT_MAX+1)
37+
if (dict->size() <= UINT_MAX + 1)
3838
{
3939
stamp_max_value = UINT_MAX;
4040
return 4;
@@ -76,6 +76,6 @@ StampDict::ExtractStr(std::shared_ptr<Blob> blob)
7676
exit(1);
7777
}
7878
long long actual_index = ((double) index_oracle) / stamp_max_value * dict->size();
79-
if ( actual_index == dict->size()) actual_index--; /* If we hit the boundary step inside a bit*/
79+
if (actual_index == dict->size()) actual_index--; /* If we hit the boundary step inside a bit*/
8080
return dict->get(actual_index);
8181
}

blobstamper/stamp_dict.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ class StampDict: public StampBaseStr
4747
int maxSize() override {return stamp_size;}
4848
};
4949

50-
class StampDictLCAlphaSmall : public StampDict
50+
class StampDictLCAlphaSmall: public StampDict
5151
{
5252
public:
53-
StampDictLCAlphaSmall (): StampDict(std::make_shared<DictLCAlphaSmall>()) {};
53+
StampDictLCAlphaSmall(): StampDict(std::make_shared<DictLCAlphaSmall>()) {};
5454
};
5555

5656

blobstamper/stamp_enumerator.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ std::string StampStrEnumerator::ExtractStr(std::shared_ptr<Blob> blob)
2929
std::vector<std::string> data = ExtractStrVector(blob);
3030
std::string res = "";
3131

32-
for(std::string s : data)
32+
for (std::string s : data)
3333
{
3434
if (!res.empty())
3535
{
36-
res+= separator;
36+
res += separator;
3737
}
38-
res+= s;
38+
res += s;
3939
}
4040
res = left_bracket + res + right_bracket;
4141
return res;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy