Skip to content

Commit 04752ec

Browse files
clang format apply
1 parent 6b64112 commit 04752ec

File tree

1,376 files changed

+390844
-410046
lines changed

Some content is hidden

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

1,376 files changed

+390844
-410046
lines changed

.clang-format

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ DerivePointerAlignment: false
1818
IndentCaseLabels: true
1919
NamespaceIndentation: None
2020
PointerAlignment: Left
21-
SortIncludes: true
21+
SortIncludes: false
2222
Standard: Auto

datatypes/mcs_data_condition.h

+23-23
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@
1515
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
1616
MA 02110-1301, USA. */
1717

18-
1918
#pragma once
2019

2120
namespace datatypes
2221
{
23-
2422
/*
2523
A subset of SQL Conditions related to data processing.
2624
SQLSTATE terminology is used for categories:
@@ -30,36 +28,39 @@ namespace datatypes
3028
*/
3129
class DataCondition
3230
{
33-
public:
31+
public:
3432
enum Code
3533
{
3634
// Code Value SQLSTATE
37-
S_SUCCESS = 0, // 00000
38-
W_STRING_DATA_RIGHT_TRUNCATION = 1 << 1, // 01004
39-
X_STRING_DATA_RIGHT_TRUNCATION = 1 << 16, // 22001
40-
X_NUMERIC_VALUE_OUT_OF_RANGE = 1 << 17, // 22003
41-
X_INVALID_CHARACTER_VALUE_FOR_CAST = 1 << 18, // 22018
35+
S_SUCCESS = 0, // 00000
36+
W_STRING_DATA_RIGHT_TRUNCATION = 1 << 1, // 01004
37+
X_STRING_DATA_RIGHT_TRUNCATION = 1 << 16, // 22001
38+
X_NUMERIC_VALUE_OUT_OF_RANGE = 1 << 17, // 22003
39+
X_INVALID_CHARACTER_VALUE_FOR_CAST = 1 << 18, // 22018
4240
};
43-
DataCondition()
44-
:mError(S_SUCCESS)
45-
{ }
46-
DataCondition(Code code)
47-
:mError(code)
48-
{ }
49-
DataCondition & operator|=(Code code)
41+
DataCondition() : mError(S_SUCCESS)
5042
{
51-
mError= (Code) (mError | code);
43+
}
44+
DataCondition(Code code) : mError(code)
45+
{
46+
}
47+
DataCondition& operator|=(Code code)
48+
{
49+
mError = (Code)(mError | code);
5250
return *this;
5351
}
5452
DataCondition operator&(Code rhs) const
5553
{
56-
return DataCondition((Code) (mError & rhs));
54+
return DataCondition((Code)(mError & rhs));
55+
}
56+
operator Code() const
57+
{
58+
return mError;
5759
}
58-
operator Code () const { return mError; }
5960

6061
// Adjust a sigened integer of any size to the range [-absMaxVal , +absMaxVal]
61-
template<typename T>
62-
void adjustSIntXRange(T & val, T absMaxVal)
62+
template <typename T>
63+
void adjustSIntXRange(T& val, T absMaxVal)
6364
{
6465
if (val > absMaxVal)
6566
{
@@ -73,9 +74,8 @@ class DataCondition
7374
}
7475
}
7576

76-
private:
77+
private:
7778
Code mError;
7879
};
7980

80-
} // namespace datatypes
81-
81+
} // namespace datatypes

0 commit comments

Comments
 (0)