VirtualBox

Changeset 74181 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Sep 10, 2018 12:43:30 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
124956
Message:

IPRT/rest: Wrote unit tests for RTCRestDate. Addressed some issues found. Marked methods implemented in headers with 'inline'. bugref:9167

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/rest/rest-primary-object-types.cpp

    r74176 r74181  
    13981398int RTCRestDate::deserializeFromJson(RTCRestJsonCursor const &a_rCursor)
    13991399{
     1400    setNull();
     1401
    14001402    RTJSONVALTYPE enmType = RTJsonValueGetType(a_rCursor.m_hValue);
    14011403    if (enmType == RTJSONVALTYPE_STRING)
     
    14191421
    14201422    if (enmType == RTJSONVALTYPE_NULL)
    1421     {
    1422         setNull();
    1423         return VINF_SUCCESS;
    1424     }
     1423        return VINF_SUCCESS;
    14251424
    14261425    return a_rCursor.m_pPrimary->addError(a_rCursor, VERR_REST_WRONG_JSON_TYPE_FOR_DATE, "wrong JSON type for date: %s",
     
    14461445                            uint32_t a_fFlags /*= kCollectionFormat_Unspecified*/)
    14471446{
     1447    setNull();
    14481448    if (a_rValue.startsWithWord("null", RTCString::CaseInsensitive))
    1449     {
    1450         setNull();
    1451         return VINF_SUCCESS;
    1452     }
     1449        return VINF_SUCCESS;
    14531450
    14541451    int rc = m_strFormatted.assignNoThrow(a_rValue);
     
    15981595int RTCRestDate::format(kFormat a_enmFormat)
    15991596{
    1600     m_fNullIndicator = true;
    1601     m_enmFormat = a_enmFormat;
     1597    m_fNullIndicator = false;
     1598    m_fTimeSpecOkay  = true;
     1599    m_enmFormat      = a_enmFormat;
    16021600    int rc;
    16031601    switch (a_enmFormat)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette