VirtualBox

Ignore:
Timestamp:
Feb 3, 2021 3:43:22 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
142606
Message:

Main: Doxygen v1.8.20 seems to get confused by appendTokenizedStrings and dumpHostDnsStrVector prototypes and unable to match them to definitions, so just move the definitions up to the top and drop the prototypes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/win/HostDnsServiceWin.cpp

    r83794 r87578  
    4242#include <vector>
    4343
    44 static inline int registerNotification(const HKEY& hKey, HANDLE& hEvent);
    45 static void appendTokenizedStrings(std::vector<std::string> &vecStrings, const std::string &strToAppend, char chDelim = ' ');
     44
     45DECLINLINE(int) registerNotification(const HKEY &hKey, HANDLE &hEvent)
     46{
     47    LONG lrc = RegNotifyChangeKeyValue(hKey,
     48                                       TRUE,
     49                                       REG_NOTIFY_CHANGE_LAST_SET,
     50                                       hEvent,
     51                                       TRUE);
     52    AssertMsgReturn(lrc == ERROR_SUCCESS,
     53                    ("Failed to register event on the key. Please debug me!"),
     54                    VERR_INTERNAL_ERROR);
     55
     56    return VINF_SUCCESS;
     57}
     58
     59static void appendTokenizedStrings(std::vector<std::string> &vecStrings, const std::string &strToAppend, char chDelim /* = ' ' */)
     60{
     61    if (strToAppend.empty())
     62        return;
     63
     64    std::istringstream stream(strToAppend);
     65    std::string substr;
     66
     67    while (std::getline(stream, substr, chDelim))
     68    {
     69        if (substr.empty())
     70            continue;
     71
     72        if (std::find(vecStrings.cbegin(), vecStrings.cend(), substr) != vecStrings.cend())
     73            continue;
     74
     75        vecStrings.push_back(substr);
     76    }
     77}
     78
    4679
    4780struct HostDnsServiceWin::Data
     
    444477}
    445478
    446 static inline int registerNotification(const HKEY& hKey, HANDLE& hEvent)
    447 {
    448     LONG lrc = RegNotifyChangeKeyValue(hKey,
    449                                        TRUE,
    450                                        REG_NOTIFY_CHANGE_LAST_SET,
    451                                        hEvent,
    452                                        TRUE);
    453     AssertMsgReturn(lrc == ERROR_SUCCESS,
    454                     ("Failed to register event on the key. Please debug me!"),
    455                     VERR_INTERNAL_ERROR);
    456 
    457     return VINF_SUCCESS;
    458 }
    459 
    460 static void appendTokenizedStrings(std::vector<std::string> &vecStrings, const std::string &strToAppend, char chDelim /* = ' ' */)
    461 {
    462     if (strToAppend.empty())
    463         return;
    464 
    465     std::istringstream stream(strToAppend);
    466     std::string substr;
    467 
    468     while (std::getline(stream, substr, chDelim))
    469     {
    470         if (substr.empty())
    471             continue;
    472 
    473         if (std::find(vecStrings.cbegin(), vecStrings.cend(), substr) != vecStrings.cend())
    474             continue;
    475 
    476         vecStrings.push_back(substr);
    477     }
    478 }
    479 
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