Skip to content

Commit 12d1e58

Browse files
authored
Merge pull request #161 from dejanskledar/fix/ios-compile-bool
Fix Compile error on iOS for Track Cost Spend Former-commit-id: 43dba25ec9b6a95529bebe7300c140b7307e15a5
2 parents ab175de + 183adcf commit 12d1e58

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

cpp/inspireface/c_api/inspireface.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ HResult HFGetFaceFiveKeyPointsFromFaceToken(HFFaceBasicToken singleFace, HPoint2
649649
return HSUCCEED;
650650
}
651651

652-
HResult HFSessionSetEnableTrackCostSpend(HFSession session, bool value) {
652+
HResult HFSessionSetEnableTrackCostSpend(HFSession session, int value) {
653653
if (session == nullptr) {
654654
return HERR_INVALID_CONTEXT_HANDLE;
655655
}

cpp/inspireface/c_api/inspireface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ HYPER_CAPI_EXPORT extern HResult HFGetFaceFiveKeyPointsFromFaceToken(HFFaceBasic
559559
* @param value The enable cost spend value
560560
* @return int32_t Status code of the operation.
561561
* */
562-
HYPER_CAPI_EXPORT extern HResult HFSessionSetEnableTrackCostSpend(HFSession session, bool value);
562+
HYPER_CAPI_EXPORT extern HResult HFSessionSetEnableTrackCostSpend(HFSession session, int value);
563563

564564
/**
565565
* @brief Print the cost spend

cpp/inspireface/face_session.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ int32_t FaceSession::SetTrackModeDetectInterval(int value) {
416416
return HSUCCEED;
417417
}
418418

419-
int32_t FaceSession::SetEnableTrackCostSpend(bool value) {
419+
int32_t FaceSession::SetEnableTrackCostSpend(int value) {
420420
m_enable_track_cost_spend_ = value;
421421
m_face_track_cost_->Reset();
422422
return HSUCCEED;

cpp/inspireface/face_session.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ class INSPIRE_API FaceSession {
340340
* @param value The enable cost spend value
341341
* @return int32_t Status code of the operation.
342342
* */
343-
int32_t SetEnableTrackCostSpend(bool value);
343+
int32_t SetEnableTrackCostSpend(int value);
344344

345345
/**
346346
* @brief Print the cost spend
@@ -392,7 +392,7 @@ class INSPIRE_API FaceSession {
392392
// cost spend
393393
std::shared_ptr<inspirecv::TimeSpend> m_face_track_cost_;
394394

395-
bool m_enable_track_cost_spend_ = false;
395+
int m_enable_track_cost_spend_ = 0;
396396
};
397397

398398
} // namespace inspire

cpp/sample/api/sample_face_track_benchmark.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ int main(int argc, char* argv[]) {
9595
int loop = 100;
9696

9797
// Enable the cost spend
98-
HFSessionSetEnableTrackCostSpend(session, true);
98+
HFSessionSetEnableTrackCostSpend(session, 1);
9999

100100
// Execute HF_FaceContextRunFaceTrack captures face information in an image
101101
HFMultipleFaceData multipleFaceData = {0};

0 commit comments

Comments
 (0)