Another loop / goodie. Needed a new header though.
This commit is contained in:
+7
-3
@@ -4,7 +4,7 @@
|
|||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
#include "arch/Dialog/Dialog.h"
|
#include "arch/Dialog/Dialog.h"
|
||||||
#include "Foreach.h"
|
#include "Foreach.h"
|
||||||
|
#include <numeric>
|
||||||
|
|
||||||
RString Command::GetName() const
|
RString Command::GetName() const
|
||||||
{
|
{
|
||||||
@@ -81,10 +81,14 @@ static void SplitWithQuotes( const RString sSource, const char Delimitor, vector
|
|||||||
|
|
||||||
RString Commands::GetOriginalCommandString() const
|
RString Commands::GetOriginalCommandString() const
|
||||||
{
|
{
|
||||||
|
#ifdef MACOSX
|
||||||
RString s;
|
RString s;
|
||||||
FOREACH_CONST( Command, v, c )
|
for (Command const &c : v)
|
||||||
s += c->GetOriginalCommandString();
|
s += c.GetOriginalCommandString();
|
||||||
return s;
|
return s;
|
||||||
|
#else
|
||||||
|
return std::accumulate(v.begin(), v.end(), RString(), [](RString &res, Command const &c) { return res += c.GetOriginalCommandString(); });
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParseCommands( const RString &sCommands, Commands &vCommandsOut )
|
void ParseCommands( const RString &sCommands, Commands &vCommandsOut )
|
||||||
|
|||||||
Reference in New Issue
Block a user