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";

View file

@ -318,7 +318,7 @@ static int attempt_import(const Json &root, const string &name, Json &res)
while (source_name_exists(out_sources, out_name))
out_name = name + "(" + to_string(copy++) + ")";
if (scene_name == "")
if (scene_name.empty())
scene_name = out_name;
string sl_id = scene["id"].string_value();
@ -399,7 +399,7 @@ string SLImporter::Name(const string &path)
string c_name = c["name"].string_value();
if (c_id == manifest_file) {
name = c_name;
name = std::move(c_name);
name_set = true;
break;
}

View file

@ -233,7 +233,7 @@ static void parse_items(QDomNode &item, Json::array &items,
}
name = attr.namedItem("cname").nodeValue().toStdString();
if (name == "" || name[0] == '\0')
if (name.empty() || name[0] == '\0')
name = attr.namedItem("name").nodeValue().toStdString();
temp_name = name;
@ -264,7 +264,7 @@ static void parse_items(QDomNode &item, Json::array &items,
} else if (type == 2) {
QString audio = attr.namedItem("itemaudio").nodeValue();
if (audio == "") {
if (audio.isEmpty()) {
source["id"] = "dshow_input";
} else {
source["id"] = "wasapi_input_capture";
@ -294,7 +294,7 @@ static void parse_items(QDomNode &item, Json::array &items,
QString display =
o_attr.namedItem("desktop").nodeValue();
if (display != "") {
if (!display.isEmpty()) {
source["id"] = "monitor_capture";
int cursor = attr.namedItem("ScrCapShowMouse")
.nodeValue()
@ -312,7 +312,7 @@ static void parse_items(QDomNode &item, Json::array &items,
int pos = exec.lastIndexOf('\\');
if (_class == "") {
if (_class.isEmpty()) {
_class = "class";
}
@ -421,7 +421,7 @@ static Json::object parse_scenes(QDomElement &scenes)
QString name = attr.namedItem("name").nodeValue();
QString id = attr.namedItem("id").nodeValue();
if (first == "")
if (first.isEmpty())
first = name;
Json out = Json::object{
@ -492,7 +492,7 @@ bool XSplitImporter::Check(const string &path)
string pos = file_data.Get();
string line = ReadLine(pos);
while (line != "") {
while (!line.empty()) {
if (line.substr(0, 5) == "<?xml") {
line = ReadLine(pos);
} else {