提交 cc7d67d0 编写于 作者: J jpark37

UI: Redundant/bad casts

上级 a6af5491
......@@ -130,7 +130,7 @@ static void AddExtraModulePaths()
if (ret <= 0)
return;
string path = (char *)base_module_dir;
string path = base_module_dir;
#if defined(__APPLE__)
obs_add_module_path((path + "/bin").c_str(), (path + "/data").c_str());
......@@ -4752,7 +4752,7 @@ static BPtr<char> ReadLogFile(const char *subdir, const char *log)
if (GetConfigPath(logDir, sizeof(logDir), subdir) <= 0)
return nullptr;
string path = (char *)logDir;
string path = logDir;
path += "/";
path += log;
......@@ -4822,7 +4822,7 @@ void OBSBasic::on_actionViewCurrentLog_triggered()
const char *log = App()->GetCurrentLog();
string path = (char *)logDir;
string path = logDir;
path += "/";
path += log;
......
......@@ -29,7 +29,8 @@
using namespace std;
static void CreateTransitionScene(OBSSource scene, char *text, uint32_t color);
static void CreateTransitionScene(OBSSource scene, const char *text,
uint32_t color);
OBSBasicProperties::OBSBasicProperties(QWidget *parent, OBSSource source_)
: QDialog(parent),
......@@ -153,8 +154,8 @@ OBSBasicProperties::OBSBasicProperties(QWidget *parent, OBSSource source_)
uint32_t colorA = 0xFFB26F52;
uint32_t colorB = 0xFF6FB252;
CreateTransitionScene(sourceA, (char *)"A", colorA);
CreateTransitionScene(sourceB, (char *)"B", colorB);
CreateTransitionScene(sourceA, "A", colorA);
CreateTransitionScene(sourceB, "B", colorB);
/**
* The cloned source is made from scratch, rather than using
......@@ -278,7 +279,8 @@ static obs_source_t *CreateLabel(const char *name, size_t h)
return txtSource;
}
static void CreateTransitionScene(OBSSource scene, char *text, uint32_t color)
static void CreateTransitionScene(OBSSource scene, const char *text,
uint32_t color)
{
obs_data_t *settings = obs_data_create();
obs_data_set_int(settings, "width", obs_source_get_width(scene));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册