VirtualBox

Changeset 83799 in vbox for trunk


Ignore:
Timestamp:
Apr 18, 2020 2:16:46 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
137325
Message:

VBoxAutostart: VC++ 14.1 adjustments. Removed some unnecessary stdc++ headers and eliminated one silly std::string usage. [adjustments] bugref:8489

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxAutostart/VBoxAutostart-posix.cpp

    r83797 r83799  
    276276    for (unsigned i = 0; i < RT_ELEMENTS(g_aOptions); i++)
    277277    {
    278         char szOptions[128];
    279         const char *pszOptions = g_aOptions[i].pszLong;
    280         if (g_aOptions[i].iShort < 1000) /* Don't show short options which are defined by an ID! */
    281         {
    282             RTStrPrintf(szOptions, sizeof(szOptions), "%s, -%c", g_aOptions[i].pszLong, g_aOptions[i].iShort);
    283             pszOptions = szOptions;
    284         }
    285 
    286         const char *pcszDescr = "";
     278        const char *pcszDescr;
    287279        switch (g_aOptions[i].iShort)
    288280        {
     
    316308                pcszDescr = "Name of the configuration file for the global overrides.";
    317309                break;
    318         }
    319 
    320         RTStrmPrintf(g_pStdErr, "%-23s%s\n", pszOptions, pcszDescr);
    321     }
    322 
    323     RTStrmPrintf(g_pStdErr, "\nUse environment variable VBOXAUTOSTART_RELEASE_LOG for logging options.\n");
     310            default:
     311                AssertFailedBreakStmt(pcszDescr = "");
     312        }
     313
     314        if (g_aOptions[i].iShort < 1000)
     315            RTStrmPrintf(g_pStdErr,
     316                         "  %s, -%c\n"
     317                         "      %s\n", g_aOptions[i].pszLong, g_aOptions[i].iShort, pcszDescr);
     318        else
     319            RTStrmPrintf(g_pStdErr,
     320                         "  %s\n"
     321                         "      %s\n", g_aOptions[i].pszLong, pcszDescr);
     322    }
     323
     324    RTStrmPrintf(g_pStdErr,
     325                 "\n"
     326                 "Use environment variable VBOXAUTOSTART_RELEASE_LOG for logging options.\n");
    324327}
    325328
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