mpd: use lambda closures instead of passing vectors to functions
This commit is contained in:
@@ -35,8 +35,12 @@ void ServerInfo::Init()
|
||||
SetDimensions();
|
||||
w = new Scrollpad((COLS-itsWidth)/2, (MainHeight-itsHeight)/2+MainStartY, itsWidth, itsHeight, "MPD server info", Config.main_color, Config.window_border);
|
||||
|
||||
Mpd.GetURLHandlers(itsURLHandlers);
|
||||
Mpd.GetTagTypes(itsTagTypes);
|
||||
Mpd.GetURLHandlers([this](std::string &&handler) {
|
||||
itsURLHandlers.push_back(handler);
|
||||
});
|
||||
Mpd.GetTagTypes([this](std::string &&tag_type) {
|
||||
itsTagTypes.push_back(tag_type);
|
||||
});
|
||||
|
||||
isInitialized = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user