Fix indentation

This commit is contained in:
Juergen Spitzmueller 2022-04-04 12:02:25 +02:00
parent bbf21502bf
commit 31ac9ed59f

View File

@ -1075,8 +1075,7 @@ void MatchStringAdv::FillResults(MatchResult &found_mr)
valid_matches = found_mr.result.size();
for (size_t i = 0; i < found_mr.result.size(); i++)
matches[i] = found_mr.result[i];
}
else
} else
valid_matches = 0;
}
@ -1271,7 +1270,7 @@ static Features identifyFeatures(string const & s)
* defines values features of a key "\\[a-z]+{"
*/
class KeyInfo {
public:
public:
enum KeyType {
/* Char type with content discarded
* like \hspace{1cm} */
@ -1333,7 +1332,7 @@ class KeyInfo {
};
class Border {
public:
public:
Border(int l=0, int u=0) : low(l), upper(u) {}
int low;
int upper;
@ -1343,9 +1342,9 @@ class Border {
class Intervall {
bool isPatternString_;
public:
explicit Intervall(bool isPattern, string const & p) :
isPatternString_(isPattern), par(p), ignoreidx(-1), actualdeptindex(0),
hasTitle(false), langcount(0)
explicit Intervall(bool isPattern, string const & p)
: isPatternString_(isPattern), par(p), ignoreidx(-1),
actualdeptindex(0), hasTitle(false), langcount(0)
{
depts[0] = 0;
closes[0] = 0;
@ -1369,7 +1368,9 @@ public:
int findclosing(int start, int end, char up, char down, int repeat);
void handleParentheses(int lastpos, bool closingAllowed);
bool hasTitle;
int langcount; // Number of disabled language specs up to current position in actual interval
// Number of disabled language specs up
// to current position in actual interval
int langcount;
int isOpeningPar(int pos) const;
string titleValue;
void output(ostringstream &os, int lastpos);
@ -1399,9 +1400,8 @@ void Intervall::setForDefaultLang(KeyInfo const & defLang) const
if (ignoreidx >= 0) {
int value = defLang._tokenstart + defLang._tokensize;
int borderidx = 0;
if (hasTitle) {
if (hasTitle)
borderidx = 1;
}
if (value > 0) {
if (borders[borderidx].low < value)
borders[borderidx].low = value;
@ -1550,7 +1550,7 @@ static void buildaccent(string n, string param, string values)
// Helper function
static string getutf8(unsigned uchar)
{
#define maxc 5
#define maxc 5
string ret = string();
char c[maxc] = {0};
if (uchar <= 0x7f) {
@ -2064,7 +2064,7 @@ typedef vector< KeyInfo> Entries;
static KeysMap keys = unordered_map<string, KeyInfo>();
class LatexInfo {
private:
private:
int entidx_;
Entries entries_;
Intervall interval_;
@ -2074,7 +2074,7 @@ class LatexInfo {
void processRegion(int start, int region_end); /* remove {} parts */
void removeHead(KeyInfo const &, int count=0);
public:
public:
LatexInfo(string const & par, bool isPatternString)
: entidx_(-1), interval_(isPatternString, par)
{
@ -2183,7 +2183,7 @@ class MathInfo {
};
size_t actualIdx_;
vector<MathEntry> entries_;
public:
public:
MathInfo() {
actualIdx_ = 0;
}
@ -4088,9 +4088,9 @@ static void displayMResult(MatchResult &mres, string from, DocIterator & cur)
for (size_t i = 0; i < mres.result.size(); i++)
LYXERR0( "Match " << i << " = \"" << mres.result[i] << "\"");
}
#define displayMres(s, txt, cur) displayMResult(s, txt, cur);
#define displayMres(s, txt, cur) displayMResult(s, txt, cur);
#else
#define displayMres(s, txt, cur)
#define displayMres(s, txt, cur)
#endif
/** Finalize an advanced find operation, advancing the cursor to the innermost