New upstream version 26.0.0+dfsg1

This commit is contained in:
Sebastian Ramacher 2020-10-01 22:15:25 +02:00
parent 8e020cdacb
commit 240080891f
837 changed files with 41275 additions and 9196 deletions

View file

@ -258,8 +258,6 @@ static Json::object translate_source(const Json &in, const Json &sources)
string winClass = in_settings["windowClass"].string_value();
string exec = in_settings["executable"].string_value();
string window = ":" + winClass + ":" + exec;
settings["window"] = ":" + winClass + ":" + exec;
translate_bool("captureMouse", in_settings, "capture_cursor",
@ -298,10 +296,9 @@ static void translate_sc(const Json &in, Json &out)
for (size_t i = 0; i < scenes.size(); i++) {
Json in_scene = scenes[i];
if (first_name == "")
if (first_name.empty())
first_name = in_scene["name"].string_value();
Json::object settings = Json::object{};
Json::array items = Json::array{};
Json::array sources = in_scene["sources"].array_items();
@ -391,7 +388,7 @@ static void create_data_item(Json::object &out, const string &line)
Json::array new_arr = Json::array{};
string str = out[c_name].string_value();
create_string_obj(str, new_arr);
arr = new_arr;
arr = std::move(new_arr);
}
create_string_obj(first, arr);
@ -408,7 +405,7 @@ static void create_data_item(Json::object &out, const string &line)
Json::array new_arr = Json::array{};
string str1 = out[c_name].string_value();
create_string_obj(str1, new_arr);
arr = new_arr;
arr = std::move(new_arr);
}
create_string_obj(str, arr);
@ -431,7 +428,7 @@ static Json::array create_sources(Json::object &out, string &line, string &src)
line = ReadLine(src);
size_t l_len = line.size();
while (line != "" && line[l_len - 1] != '}') {
while (!line.empty() && line[l_len - 1] != '}') {
size_t end_pos = line.find(':');
if (end_pos == string::npos)
@ -478,7 +475,7 @@ static Json::object create_object(Json::object &out, string &line, string &src)
size_t l_len = line.size() - 1;
while (line != "" && line[l_len] != '}') {
while (!line.empty() && line[l_len] != '}') {
start_pos = 0;
while (line[start_pos] == ' ')
start_pos++;
@ -511,10 +508,8 @@ int ClassicImporter::ImportScenes(const string &path, string &name, Json &res)
if (!file_data)
return IMPORTER_FILE_WONT_OPEN;
string sc_name = GetFilenameFromPath(path);
if (name == "")
name = sc_name;
if (name.empty())
name = GetFilenameFromPath(path);
Json::object data = Json::object{};
data["name"] = name;
@ -522,7 +517,7 @@ int ClassicImporter::ImportScenes(const string &path, string &name, Json &res)
string file = file_data.Get();
string line = ReadLine(file);
while (line != "" && line[0] != '\0') {
while (!line.empty() && line[0] != '\0') {
string key = line != "global sources : {" ? "scenes"
: "globals";