formatter.header().push_back(header_for(column));
map<string, ProxyConfig> configs = snappers->getConfigs();
- for (const map<string, ProxyConfig>::value_type value : configs)
+ for (const map<string, ProxyConfig>::value_type& value : configs)
{
vector<string> row;
formatter.header().push_back(toString(column));
map<string, ProxyConfig> configs = snappers->getConfigs();
- for (const map<string, ProxyConfig>::value_type value : configs)
+ for (const map<string, ProxyConfig>::value_type& value : configs)
{
vector<string> row;
json_object_object_add(formatter.root(), "configs", json_configs);
map<string, ProxyConfig> configs = snappers->getConfigs();
- for (const map<string, ProxyConfig>::value_type value : configs)
+ for (const map<string, ProxyConfig>::value_type& value : configs)
{
json_object* json_config = json_object_new_object();
json_object_array_add(json_configs, json_config);
return nullptr;
json_object* json_userdata = json_object_new_object();
- for (const map<string, string>::value_type sub_value : tmp)
+ for (const map<string, string>::value_type& sub_value : tmp)
json_object_object_add(json_userdata, sub_value.first.c_str(),
json_object_new_string(sub_value.second.c_str()));
#include "zypp_commit_plugin.h"
#include "solvable_matcher.h"
-ostream& operator <<(ostream& os, set<string> ss) {
+ostream&
+operator<<(ostream& os, const set<string>& ss)
+{
bool seen_first = false;
os << '{';
- for (auto s: ss) {
- if (seen_first) {
+ for (auto s : ss)
+ {
+ if (seen_first)
os << ", ";
- }
+
os << s;
seen_first = true;
}
, snapper_config("root")
, bus(DBUS_BUS_SYSTEM)
{
- const char * s;
+ const char* s;
s = getenv("SNAPPER_ZYPP_PLUGIN_CONFIG");
- if (s != nullptr) {
+ if (s)
plugin_config = s;
- }
s = getenv("SNAPPER_ZYPP_PLUGIN_SNAPPER_CONFIG");
- if (s != nullptr) {
+ if (s)
snapper_config = s;
- }
s = getenv("SNAPPER_ZYPP_PLUGIN_DBUS_SESSION");
- if (s != nullptr) {
+ if (s)
bus = DBUS_BUS_SESSION;
- }
}
};