Skip to content

Commit d76cf1c

Browse files
committed
update uncrustify.cfg for v0.80 and reformat code
1 parent a75bf7f commit d76cf1c

9 files changed

Lines changed: 2969 additions & 1197 deletions

File tree

src/rapidcsv.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ namespace rapidcsv
304304
}
305305

306306
template<typename T>
307-
using ConvFunc = std::function<void (const std::string & pStr, T & pVal)>;
307+
using ConvFunc = std::function<void (const std::string& pStr, T& pVal)>;
308308

309309
/**
310310
* @brief Datastructure holding parameters controlling which row and column should be
@@ -1803,19 +1803,22 @@ namespace rapidcsv
18031803

18041804
size_t GetDataColumnCount() const
18051805
{
1806-
const size_t firstDataRow = static_cast<size_t>((mLabelParams.mColumnNameIdx >= 0) ? mLabelParams.mColumnNameIdx : 0);
1806+
const size_t firstDataRow =
1807+
static_cast<size_t>((mLabelParams.mColumnNameIdx >= 0) ? mLabelParams.mColumnNameIdx : 0);
18071808
return (mData.size() > firstDataRow) ? mData.at(firstDataRow).size() : 0;
18081809
}
18091810

18101811
inline size_t GetDataRowIndex(const size_t pRowIdx) const
18111812
{
1812-
const size_t firstDataRow = static_cast<size_t>((mLabelParams.mColumnNameIdx + 1 >= 0) ? mLabelParams.mColumnNameIdx + 1 : 0);
1813+
const size_t firstDataRow =
1814+
static_cast<size_t>((mLabelParams.mColumnNameIdx + 1 >= 0) ? mLabelParams.mColumnNameIdx + 1 : 0);
18131815
return pRowIdx + firstDataRow;
18141816
}
18151817

18161818
inline size_t GetDataColumnIndex(const size_t pColumnIdx) const
18171819
{
1818-
const size_t firstDataColumn = static_cast<size_t>((mLabelParams.mRowNameIdx + 1 >= 0) ? mLabelParams.mRowNameIdx + 1 : 0);
1820+
const size_t firstDataColumn =
1821+
static_cast<size_t>((mLabelParams.mRowNameIdx + 1 >= 0) ? mLabelParams.mRowNameIdx + 1 : 0);
18191822
return pColumnIdx + firstDataColumn;
18201823
}
18211824

tests/ptest001.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ int main()
2424
timer.Stop();
2525

2626
// dummy usage of variables
27-
(void) column;
28-
(void) row;
29-
(void) cell;
27+
(void)column;
28+
(void)row;
29+
(void)cell;
3030
}
3131

3232
timer.ReportMedian();

tests/test057.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ int main()
1818
};
1919
const unsigned int u16le_len = 58;
2020

21-
std::string csv(reinterpret_cast<const char *>(u16le), u16le_len);
21+
std::string csv(reinterpret_cast<const char*>(u16le), u16le_len);
2222
// "-,A,B,C\n"
2323
// "1,3,9,81\n"
2424
// "2,4,16,256\n"

tests/test058.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ int main()
1818
};
1919
const unsigned int u16be_len = 58;
2020

21-
std::string csv(reinterpret_cast<const char *>(u16be), u16be_len);
21+
std::string csv(reinterpret_cast<const char*>(u16be), u16be_len);
2222
// "-,A,B,C\n"
2323
// "1,3,9,81\n"
2424
// "2,4,16,256\n"

tests/test059.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ int main()
1818
};
1919
const unsigned int refu16le_len = 58;
2020

21-
std::string csvref(reinterpret_cast<const char *>(refu16le), refu16le_len);
21+
std::string csvref(reinterpret_cast<const char*>(refu16le), refu16le_len);
2222
// "-,A,B,C\n"
2323
// "1,3,9,81\n"
2424
// "2,4,16,256\n"
@@ -33,7 +33,7 @@ int main()
3333
};
3434
const unsigned int u16le_len = 50;
3535

36-
std::string csv(reinterpret_cast<const char *>(u16le), u16le_len);
36+
std::string csv(reinterpret_cast<const char*>(u16le), u16le_len);
3737
// "-,A,B,C\n"
3838
// "1,0,0,0\n"
3939
// "2,0,0,0\n"

tests/test060.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ int main()
1818
};
1919
const unsigned int refu16be_len = 58;
2020

21-
std::string csvref(reinterpret_cast<const char *>(refu16be), refu16be_len);
21+
std::string csvref(reinterpret_cast<const char*>(refu16be), refu16be_len);
2222
// "-,A,B,C\n"
2323
// "1,3,9,81\n"
2424
// "2,4,16,256\n"
@@ -33,7 +33,7 @@ int main()
3333
};
3434
const unsigned int u16be_len = 50;
3535

36-
std::string csv(reinterpret_cast<const char *>(u16be), u16be_len);
36+
std::string csv(reinterpret_cast<const char*>(u16be), u16be_len);
3737
// "-,A,B,C\n"
3838
// "1,0,0,0\n"
3939
// "2,0,0,0\n"

tests/test098.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ int main()
1515
",\n"
1616
",\n"
1717
","
18-
;
18+
;
1919

2020
std::istringstream sstream(csv);
2121
rapidcsv::Document doc(sstream, rapidcsv::LabelParams(-1, -1));
@@ -34,7 +34,7 @@ int main()
3434
",\n"
3535
",\n"
3636
",\n"
37-
;
37+
;
3838

3939
std::istringstream sstream(csv);
4040
rapidcsv::Document doc(sstream, rapidcsv::LabelParams(-1, -1));

tests/unittest.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#define ExpectEqual(t, a, b) ExpectEqualFun<t>(a, b, #a, #b, __FILE__, __LINE__)
1616
#define ExpectTrue(a) ExpectTrueFun(a, #a, __FILE__, __LINE__)
1717

18+
// *INDENT-OFF*
1819
#define ExpectException(expr, excp) \
1920
do \
2021
{ \
@@ -90,6 +91,7 @@
9091
} \
9192
} \
9293
while (0)
94+
// *INDENT-ON*
9395

9496

9597
namespace unittest

0 commit comments

Comments
 (0)