- Timestamp:
- Aug 26, 2018 8:28:30 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/rest/rest-primary-object-types.cpp
r73898 r73900 56 56 57 57 58 int RTCRestObjectBase::toString(RTCString *a_pDst, uint32_t fFlags)59 { 60 Assert( fFlags == 0);61 RT_NOREF(fFlags); 58 int RTCRestObjectBase::toString(RTCString *a_pDst, uint32_t a_fFlags /*= 0*/) const 59 { 60 Assert(a_fFlags == 0); RT_NOREF(a_fFlags); 61 62 62 /* 63 63 * Just wrap the JSON serialization method. … … 69 69 70 70 71 RTCString RTCRestObjectBase::toString() 71 RTCString RTCRestObjectBase::toString() const 72 72 { 73 73 RTCString strRet; … … 124 124 125 125 126 RTCRestOutputBase &RTCRestBool::serializeAsJson(RTCRestOutputBase &a_rDst) 126 RTCRestOutputBase &RTCRestBool::serializeAsJson(RTCRestOutputBase &a_rDst) const 127 127 { 128 128 a_rDst.printf(m_fValue ? "true" : "false"); … … 156 156 157 157 158 int RTCRestBool::toString(RTCString *a_pDst, uint32_t fFlags /*= 0*/)159 { 160 Assert( !fFlags);161 RT_NOREF(fFlags); 158 int RTCRestBool::toString(RTCString *a_pDst, uint32_t a_fFlags /*= 0*/) const 159 { 160 Assert(a_fFlags == 0); RT_NOREF(a_fFlags); 161 162 162 /* Be a little careful here to avoid throwing anything. */ 163 163 int rc = a_pDst->reserveNoThrow(m_fValue ? sizeof("true") : sizeof("false")); … … 225 225 226 226 227 RTCRestOutputBase &RTCRestInt64::serializeAsJson(RTCRestOutputBase &a_rDst) 227 RTCRestOutputBase &RTCRestInt64::serializeAsJson(RTCRestOutputBase &a_rDst) const 228 228 { 229 229 a_rDst.printf("%RI64", m_iValue); … … 254 254 255 255 256 int RTCRestInt64::toString(RTCString *a_pDst, uint32_t fFlags /*= 0*/)257 { 258 Assert( !fFlags);259 RT_NOREF(fFlags); 256 int RTCRestInt64::toString(RTCString *a_pDst, uint32_t a_fFlags /*= 0*/) const 257 { 258 Assert(a_fFlags == 0); RT_NOREF(a_fFlags); 259 260 260 /* Be a little careful here to avoid throwing anything. */ 261 261 char szValue[64]; … … 321 321 322 322 323 RTCRestOutputBase &RTCRestInt32::serializeAsJson(RTCRestOutputBase &a_rDst) 323 RTCRestOutputBase &RTCRestInt32::serializeAsJson(RTCRestOutputBase &a_rDst) const 324 324 { 325 325 a_rDst.printf("%RI32", m_iValue); … … 356 356 357 357 358 int RTCRestInt32::toString(RTCString *a_pDst, uint32_t fFlags /*= 0*/)359 { 360 Assert( !fFlags);361 RT_NOREF(fFlags); 358 int RTCRestInt32::toString(RTCString *a_pDst, uint32_t a_fFlags /*= 0*/) const 359 { 360 Assert(a_fFlags == 0); RT_NOREF(a_fFlags); 361 362 362 /* Be a little careful here to avoid throwing anything. */ 363 363 char szValue[16]; … … 423 423 424 424 425 RTCRestOutputBase &RTCRestInt16::serializeAsJson(RTCRestOutputBase &a_rDst) 425 RTCRestOutputBase &RTCRestInt16::serializeAsJson(RTCRestOutputBase &a_rDst) const 426 426 { 427 427 a_rDst.printf("%RI16", m_iValue); … … 458 458 459 459 460 int RTCRestInt16::toString(RTCString *a_pDst, uint32_t fFlags /*= 0*/)461 { 462 Assert( !fFlags);463 RT_NOREF(fFlags); 460 int RTCRestInt16::toString(RTCString *a_pDst, uint32_t a_fFlags /*= 0*/) const 461 { 462 Assert(a_fFlags == 0); RT_NOREF(a_fFlags); 463 464 464 /* Be a little careful here to avoid throwing anything. */ 465 465 char szValue[8]; … … 517 517 518 518 519 RTCRestOutputBase &RTCRestDouble::serializeAsJson(RTCRestOutputBase &a_rDst) 519 RTCRestOutputBase &RTCRestDouble::serializeAsJson(RTCRestOutputBase &a_rDst) const 520 520 { 521 521 /* Just a simple approximation here. */ … … 540 540 541 541 542 int RTCRestDouble::toString(RTCString *a_pDst, uint32_t fFlags /*= 0*/)543 { 544 Assert( !fFlags);545 RT_NOREF(fFlags); 542 int RTCRestDouble::toString(RTCString *a_pDst, uint32_t a_fFlags /*= 0*/) const 543 { 544 Assert(a_fFlags == 0); RT_NOREF(a_fFlags); 545 546 546 /* Just a simple approximation here. */ 547 547 /** @todo implement floating point values for json. */ … … 613 613 614 614 615 RTCRestOutputBase &RTCRestString::serializeAsJson(RTCRestOutputBase &a_rDst) 615 RTCRestOutputBase &RTCRestString::serializeAsJson(RTCRestOutputBase &a_rDst) const 616 616 { 617 617 a_rDst.printf("%RJs", m_psz); … … 647 647 648 648 649 int RTCRestString::toString(RTCString *a_pDst, uint32_t fFlags /*= 0*/)650 { 651 Assert( !fFlags);652 RT_NOREF(fFlags); 649 int RTCRestString::toString(RTCString *a_pDst, uint32_t a_fFlags /*= 0*/) const 650 { 651 Assert(a_fFlags == 0); RT_NOREF(a_fFlags); 652 653 653 /* Careful as always. */ 654 654 if (m_cch)
Note:
See TracChangeset
for help on using the changeset viewer.