0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00

Merge pull request #2035 from jpark37/remove-casts

Remove casts
This commit is contained in:
Jim 2019-08-17 11:23:06 -07:00 committed by GitHub
commit 51450b5a8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 8 deletions

View File

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

View File

@ -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));

View File

@ -603,7 +603,7 @@ static inline void gl_write_main_storage_outputs(struct gl_shader_parser *glsp,
if (!main->mapping) {
struct shader_var var = {0};
var.name = "outputval";
var.type = (char *)main->return_type;
var.type = main->return_type;
dstr_cat(&glsp->gl_string, "\n");
gl_write_main_storage_assign(glsp, &var, NULL, NULL, false);
}