Cleanup code

Remove unused #include, add header when missing
This commit is contained in:
Bruno Herbelin
2024-10-03 18:27:04 +02:00
parent 7b820e10e0
commit 9a53ffa6d0
32 changed files with 70 additions and 59 deletions

View File

@@ -18,7 +18,6 @@
**/
#include <string>
#include <algorithm>
#include <thread>
#include "Log.h"

View File

@@ -1,8 +1,6 @@
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/constants.hpp>
#include <map>
#include "View.h"
#include "Scene.h"
#include "Source.h"

View File

@@ -20,7 +20,6 @@
#include <thread>
#include <mutex>
#include <sstream>
#include <algorithm>
#include <iomanip>
#include <regex>

View File

@@ -38,7 +38,7 @@ CountVisitor::CountVisitor() : num_source_(0), num_playable_(0)
{
}
void CountVisitor::visit(Node &n)
void CountVisitor::visit(Node &)
{
}
@@ -60,12 +60,12 @@ void CountVisitor::visit(Primitive &)
}
void CountVisitor::visit(MediaPlayer &mp)
void CountVisitor::visit(MediaPlayer &)
{
}
void CountVisitor::visit(Stream &n)
void CountVisitor::visit(Stream &)
{
}
@@ -99,13 +99,13 @@ void CountVisitor::visit (SessionGroupSource& s)
++num_playable_;
}
void CountVisitor::visit (RenderSource& s)
void CountVisitor::visit (RenderSource& )
{
++num_source_;
++num_playable_;
}
void CountVisitor::visit (CloneSource& s)
void CountVisitor::visit (CloneSource& )
{
++num_source_;
++num_playable_;

View File

@@ -1,3 +1,21 @@
/*
* This file is part of vimix - video live mixer
*
* **Copyright** (C) 2019-2024 Bruno Herbelin <bruno.herbelin@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
**/
#include "Log.h"
#include "FrameBuffer.h"

View File

@@ -25,7 +25,6 @@
// because of 'zenity' access rights nightmare :(
// Thus this re-implementation of native GTK+ dialogs for linux
#include "defines.h"
#include "Settings.h"
#include "SystemToolkit.h"
#include "DialogToolkit.h"

View File

@@ -17,7 +17,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
**/
#include <chrono>
#include <ctime>
#include <glm/gtc/matrix_access.hpp>

View File

@@ -19,7 +19,6 @@
#include <vector>
#include <algorithm>
#include <sstream>
#include <iomanip>

View File

@@ -18,7 +18,6 @@
**/
#include <vector>
#include <algorithm>
#include <sstream>
#include <iomanip>

View File

@@ -21,7 +21,6 @@
**/
#include "defines.h"
#include "Log.h"
#include "Source.h"
#include "ImageProcessingShader.h"
#include "UpdateCallback.h"

View File

@@ -19,7 +19,6 @@
#include <vector>
#include <sstream>
#include <iostream>
#include <stdexcept>
// gstreamer
@@ -28,7 +27,6 @@
#include <gst/app/gstappsrc.h>
#include <gst/pbutils/pbutils.h>
#include "defines.h"
#include "GstToolkit.h"
#include "SystemToolkit.h"
#include "Log.h"

View File

@@ -20,7 +20,6 @@
#include <iostream>
#include <sstream>
#include <istream>
#include <iterator>
#include <vector>
#include <map>
#include <utility>

View File

@@ -1,5 +1,22 @@
#include <iomanip>
#include <iostream>
/*
* This file is part of vimix - video live mixer
*
* **Copyright** (C) 2019-2024 Bruno Herbelin <bruno.herbelin@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
**/
#include <thread>
/// Ableton Link is a technology that synchronizes musical beat, tempo,

View File

@@ -19,7 +19,6 @@
#include <algorithm>
#include <thread>
#include <mutex>
#include <vector>
#include <chrono>
#include <future>

View File

@@ -28,7 +28,6 @@
#include "Decorations.h"
#include "Visitor.h"
#include "BaseToolkit.h"
#include "Log.h"
#include "MixingGroup.h"

View File

@@ -17,11 +17,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
**/
#include <algorithm>
#include <sstream>
#include <thread>
#include <chrono>
#include <future>
#include <glm/gtc/matrix_transform.hpp>
#include <gst/pbutils/pbutils.h>

View File

@@ -17,9 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
**/
#include <iostream>
#include <thread>
#include <algorithm>
// ImGui
#include "ImGuiToolkit.h"

View File

@@ -16,7 +16,7 @@ void SnapshotOverlay::draw()
}
void SnapshotOverlay::update (float dt)
void SnapshotOverlay::update (float )
{

View File

@@ -17,7 +17,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
**/
#include <sstream>
#include <glm/gtc/matrix_transform.hpp>
#include "Decorations.h"

View File

@@ -17,9 +17,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
**/
#include <thread>
#include<algorithm> // for copy() and assign()
#include<iterator> // for back_inserter
// Desktop OpenGL function loader
#include <glad/glad.h>

View File

@@ -18,9 +18,6 @@
**/
#include <cstring>
#include <thread>
#include <mutex>
#include <chrono>
#include <stdlib.h>
// Desktop OpenGL function loader

View File

@@ -17,7 +17,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
**/
#include <fstream>
#include <sstream>
#include <iostream>
#include <cstring>

View File

@@ -18,7 +18,6 @@
**/
#include <iostream>
#include <locale>
#include <tinyxml2.h>
using namespace tinyxml2;

View File

@@ -17,9 +17,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
**/
#include <iostream>
#include <locale>
using namespace std;
#include <tinyxml2.h>
#include "tinyxml2Toolkit.h"
@@ -31,7 +28,7 @@ using namespace tinyxml2;
Settings::Application Settings::application;
string settingsFilename = "";
std::string settingsFilename = "";
XMLElement *save_history(Settings::History &h, const char *nodename, XMLDocument &xmlDoc)
@@ -89,7 +86,7 @@ void Settings::Save(uint64_t runtime, const std::string &filename)
// runtime
pRoot->SetAttribute("runtime", runtime + application.total_runtime);
string comment = "Settings for " + application.name;
std::string comment = "Settings for " + application.name;
XMLComment *pComment = xmlDoc.NewComment(comment.c_str());
pRoot->InsertEndChild(pComment);
@@ -241,7 +238,7 @@ void Settings::Save(uint64_t runtime, const std::string &filename)
viewsNode->SetAttribute("current", v);
viewsNode->SetAttribute("workspace", application.current_workspace);
map<int, Settings::ViewConfig>::iterator iter;
std::map<int, Settings::ViewConfig>::iterator iter;
for (iter=application.views.begin(); iter != application.views.end(); ++iter)
{
const Settings::ViewConfig& view_config = iter->second;
@@ -402,7 +399,7 @@ void load_knownhost(Settings::KnownHosts &h, const char *nodename, XMLElement *r
}
}
void Settings::Load(const string &filename)
void Settings::Load(const std::string &filename)
{
// impose C locale for all app
setlocale(LC_ALL, "C");
@@ -767,13 +764,13 @@ void Settings::Load(const string &filename)
}
void Settings::History::assign(const string &filename)
void Settings::History::assign(const std::string &filename)
{
path.assign(filename);
changed = true;
}
void Settings::History::push(const string &filename)
void Settings::History::push(const std::string &filename)
{
if (filename.empty()) {
front_is_valid = false;
@@ -810,7 +807,7 @@ void Settings::History::validate()
}
}
void Settings::KnownHosts::push(const string &ip, const string &port)
void Settings::KnownHosts::push(const std::string &ip, const std::string &port)
{
if (!ip.empty()) {
@@ -822,7 +819,7 @@ void Settings::KnownHosts::push(const string &ip, const string &port)
}
}
void Settings::KnownHosts::remove(const string &ip)
void Settings::KnownHosts::remove(const std::string &ip)
{
for (auto hit = hosts.begin(); hit != hosts.end();) {
if ( ip.compare( hit->first ) > 0 )

View File

@@ -17,11 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
**/
#include <fstream>
#include <sstream>
#include <iostream>
#include <regex>
#include <chrono>
#include <ctime>
#include <glad/glad.h>

View File

@@ -18,7 +18,6 @@
**/
#include <sstream>
#include <iostream>
#include <vector>
#include <regex>

View File

@@ -17,7 +17,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
**/
#include <algorithm>
#define GLM_ENABLE_EXPERIMENTAL
#include <glm/gtx/vector_angle.hpp>

View File

@@ -1,3 +1,21 @@
/*
* This file is part of vimix - video live mixer
*
* **Copyright** (C) 2019-2024 Bruno Herbelin <bruno.herbelin@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
**/
#include "Log.h"
#include "Decorations.h"

View File

@@ -18,7 +18,6 @@
**/
#include <string>
#include <sstream>
#include <glm/gtc/matrix_transform.hpp>
#include "Resource.h"

View File

@@ -19,7 +19,6 @@
#include <thread>
#include <sstream>
#include <iostream>
#include <cstring>
#include <algorithm>

View File

@@ -20,7 +20,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <chrono>
@@ -537,7 +536,7 @@ std::string SystemToolkit::filename_sequential(const std::string& path, const st
std::list<std::string> ls = SystemToolkit::list_directory(p, pattern);
// establish a filename for a consecutive sequence of numbers
for (int i = 0; i < ls.size() + 1; ++i) {
for (int i = 0; i < (int) ls.size() + 1; ++i) {
// clear
filename.str(std::string());
// add path

View File

@@ -21,9 +21,7 @@
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <algorithm>
#include <string>
#include <sstream>
#include <regex>
#include "defines.h"