Skip to content

Commit b2d8ce4

Browse files
committed
update src C++ layer, gstype.i, griddb.i file after checking static code using cpplint
1 parent 3ef59d1 commit b2d8ce4

33 files changed

+1191
-1063
lines changed

src/AggregationResult.cpp

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ namespace griddb {
2222
* @brief Constructor a new Aggregation Result:: Aggregation Result object
2323
* @param aggResult Stores the result of an aggregation operation
2424
*/
25-
AggregationResult::AggregationResult(GSAggregationResult* aggResult) :
26-
mAggResult(aggResult), timestamp_output_with_float(false) {
25+
AggregationResult::AggregationResult(GSAggregationResult *aggResult) :
26+
mAggResult(aggResult),
27+
timestamp_output_with_float(false) {
2728
}
2829

2930
AggregationResult::~AggregationResult() {
@@ -50,22 +51,24 @@ namespace griddb {
5051
void *value;
5152
agValue->type = type;
5253
switch (type) {
53-
case GS_TYPE_DOUBLE:
54-
value = &agValue->value.asDouble;
55-
break;
56-
case GS_TYPE_LONG:
57-
value = &agValue->value.asLong;
58-
break;
59-
case GS_TYPE_TIMESTAMP:
60-
value = &agValue->value.asTimestamp;
61-
break;
62-
default:
63-
throw GSException(mAggResult, "Not support type from Aggregation result");
64-
break;
54+
case GS_TYPE_DOUBLE:
55+
value = &agValue->value.asDouble;
56+
break;
57+
case GS_TYPE_LONG:
58+
value = &agValue->value.asLong;
59+
break;
60+
case GS_TYPE_TIMESTAMP:
61+
value = &agValue->value.asTimestamp;
62+
break;
63+
default:
64+
throw GSException(mAggResult,
65+
"Not support type from Aggregation result");
66+
break;
6567
}
6668
GSBool ret = gsGetAggregationValue(mAggResult, value, type);
6769
if (ret == GS_FALSE) {
68-
throw GSException(mAggResult,
70+
throw GSException(
71+
mAggResult,
6972
"Value cannot be retrieved from Aggregation result");
7073
}
7174
}

src/AggregationResult.h

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,20 @@
2323
#include "Field.h"
2424
#include "gridstore.h"
2525

26-
using namespace std;
27-
2826
namespace griddb {
2927

3028
class AggregationResult {
31-
32-
GSAggregationResult* mAggResult;
29+
GSAggregationResult *mAggResult;
3330

3431
friend class RowSet;
3532

36-
public:
37-
bool timestamp_output_with_float;
38-
~AggregationResult();
39-
void close();
40-
void get(GSType type, griddb::Field *agValue);
41-
AggregationResult(GSAggregationResult* aggResult);
42-
33+
public:
34+
bool timestamp_output_with_float;
35+
~AggregationResult();
36+
void close();
37+
void get(GSType type, griddb::Field *agValue);
38+
explicit AggregationResult(GSAggregationResult *aggResult);
4339
};
44-
4540
} /* namespace griddb */
4641

4742
#endif /* _AGGREGATIONRESULT_H_ */

0 commit comments

Comments
 (0)