mirror of https://github.com/odrling/Aegisub
Silence some clang warnings
Originally committed to SVN as r6558.
This commit is contained in:
parent
fed2a91598
commit
759b8433c1
|
@ -88,7 +88,6 @@ void time_log(agi_timeval &tv) {
|
||||||
|
|
||||||
// Initialize the present time to 0 and the timezone to UTC
|
// Initialize the present time to 0 and the timezone to UTC
|
||||||
unsigned __int64 tmpres = 0;
|
unsigned __int64 tmpres = 0;
|
||||||
static int tzflag = 0;
|
|
||||||
|
|
||||||
GetSystemTimeAsFileTime(&ft);
|
GetSystemTimeAsFileTime(&ft);
|
||||||
|
|
||||||
|
|
|
@ -300,9 +300,7 @@ void AssDialogue::ParseASSTags() {
|
||||||
}
|
}
|
||||||
// Drawing
|
// Drawing
|
||||||
else {
|
else {
|
||||||
AssDialogueBlockDrawing *block = new AssDialogueBlockDrawing(work);
|
Blocks.push_back(new AssDialogueBlockDrawing(work, drawingLevel));
|
||||||
block->Scale = drawingLevel;
|
|
||||||
Blocks.push_back(block);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@ public:
|
||||||
int Scale;
|
int Scale;
|
||||||
|
|
||||||
ASS_BlockType GetType() { return BLOCK_DRAWING; }
|
ASS_BlockType GetType() { return BLOCK_DRAWING; }
|
||||||
AssDialogueBlockDrawing(wxString const& text = wxString()) : AssDialogueBlock(text) { }
|
AssDialogueBlockDrawing(wxString const& text, int scale) : AssDialogueBlock(text), Scale(scale) { }
|
||||||
void TransformCoords(int trans_x,int trans_y,double mult_x,double mult_y);
|
void TransformCoords(int trans_x,int trans_y,double mult_x,double mult_y);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -57,10 +57,9 @@ AssColor::AssColor(int r, int g, int b, int a)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @brief DOCME
|
AssColor::AssColor(const wxColour &color)
|
||||||
/// @param color
|
: a(0)
|
||||||
///
|
{
|
||||||
AssColor::AssColor (const wxColour &color) {
|
|
||||||
SetWXColor(color);
|
SetWXColor(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,11 +65,6 @@ namespace {
|
||||||
lua_setfield(L, idx, name);
|
lua_setfield(L, idx, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline wxString get_wxstring(lua_State *L, int idx)
|
|
||||||
{
|
|
||||||
return wxString(lua_tostring(L, idx), wxConvUTF8);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline wxString check_wxstring(lua_State *L, int idx)
|
inline wxString check_wxstring(lua_State *L, int idx)
|
||||||
{
|
{
|
||||||
return wxString(luaL_checkstring(L, idx), wxConvUTF8);
|
return wxString(luaL_checkstring(L, idx), wxConvUTF8);
|
||||||
|
|
|
@ -300,11 +300,10 @@ void DialogDummyVideo::OnLengthChange(wxCommandEvent &)
|
||||||
void DialogDummyVideo::UpdateLengthDisplay()
|
void DialogDummyVideo::UpdateLengthDisplay()
|
||||||
{
|
{
|
||||||
double fpsval;
|
double fpsval;
|
||||||
int lengthval = 0;
|
|
||||||
if (!length_display) return;
|
if (!length_display) return;
|
||||||
bool valid = false;
|
bool valid = false;
|
||||||
if (fps->GetValue().ToDouble(&fpsval)) {
|
if (fps->GetValue().ToDouble(&fpsval)) {
|
||||||
lengthval = length->GetValue();
|
int lengthval = length->GetValue();
|
||||||
if (lengthval && fpsval > 0 && lengthval > 0) {
|
if (lengthval && fpsval > 0 && lengthval > 0) {
|
||||||
valid = true;
|
valid = true;
|
||||||
int tt = int(lengthval / fpsval * 1000); // frames / (frames/seconds) * 1000 = milliseconds
|
int tt = int(lengthval / fpsval * 1000); // frames / (frames/seconds) * 1000 = milliseconds
|
||||||
|
|
|
@ -194,7 +194,7 @@ void DialogResample::DoResampleTags (wxString name,int n,AssOverrideParameter *c
|
||||||
|
|
||||||
case PARCLASS_DRAWING:
|
case PARCLASS_DRAWING:
|
||||||
{
|
{
|
||||||
AssDialogueBlockDrawing block(curParam->Get<wxString>());
|
AssDialogueBlockDrawing block(curParam->Get<wxString>(), 1);
|
||||||
block.TransformCoords(m[0],m[2],rx,ry);
|
block.TransformCoords(m[0],m[2],rx,ry);
|
||||||
curParam->Set(block.GetText());
|
curParam->Set(block.GetText());
|
||||||
}
|
}
|
||||||
|
@ -296,7 +296,7 @@ void DialogResample::OnResample (wxCommandEvent &) {
|
||||||
catch (const char *err) {
|
catch (const char *err) {
|
||||||
wxLogMessage(err);
|
wxLogMessage(err);
|
||||||
}
|
}
|
||||||
catch (wxString err) {
|
catch (wxString const& err) {
|
||||||
wxLogMessage(err);
|
wxLogMessage(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,7 +172,7 @@ DialogStyleManager::DialogStyleManager(agi::Context *context)
|
||||||
|
|
||||||
// Catalog
|
// Catalog
|
||||||
wxSizer *CatalogBox = new wxStaticBoxSizer(wxHORIZONTAL,this,_("Catalog of available storages"));
|
wxSizer *CatalogBox = new wxStaticBoxSizer(wxHORIZONTAL,this,_("Catalog of available storages"));
|
||||||
CatalogList = new wxComboBox(this,-1, "", wxDefaultPosition, wxSize(-1,-1), 0, NULL, wxCB_READONLY | wxCB_READONLY, wxDefaultValidator, "Catalog List");
|
CatalogList = new wxComboBox(this,-1, "", wxDefaultPosition, wxSize(-1,-1), 0, NULL, wxCB_READONLY);
|
||||||
wxButton *CatalogNew = new wxButton(this, -1, _("New"));
|
wxButton *CatalogNew = new wxButton(this, -1, _("New"));
|
||||||
CatalogDelete = new wxButton(this, -1, _("Delete"));
|
CatalogDelete = new wxButton(this, -1, _("Delete"));
|
||||||
CatalogBox->Add(CatalogList,1,wxEXPAND | wxRIGHT | wxALIGN_RIGHT,5);
|
CatalogBox->Add(CatalogList,1,wxEXPAND | wxRIGHT | wxALIGN_RIGHT,5);
|
||||||
|
|
|
@ -335,7 +335,7 @@ void FrameMain::LoadSubtitles(wxString filename,wxString charset) {
|
||||||
wxMessageBox(wxString(err), "Error", wxOK | wxICON_ERROR, NULL);
|
wxMessageBox(wxString(err), "Error", wxOK | wxICON_ERROR, NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
catch (wxString err) {
|
catch (wxString const& err) {
|
||||||
wxMessageBox(err, "Error", wxOK | wxICON_ERROR, NULL);
|
wxMessageBox(err, "Error", wxOK | wxICON_ERROR, NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ namespace {
|
||||||
{ "grid/move/up", "Default", "Alt", "Up" },
|
{ "grid/move/up", "Default", "Alt", "Up" },
|
||||||
{ "grid/line/next/create", "Subtitle Edit Box", "Enter", 0 },
|
{ "grid/line/next/create", "Subtitle Edit Box", "Enter", 0 },
|
||||||
{ "grid/line/next/create", "Subtitle Edit Box", "KP_Enter", 0 },
|
{ "grid/line/next/create", "Subtitle Edit Box", "KP_Enter", 0 },
|
||||||
0
|
{ 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
void migrate_hotkeys(const char *removed[], const char *added[][4]) {
|
void migrate_hotkeys(const char *removed[], const char *added[][4]) {
|
||||||
|
|
|
@ -59,7 +59,7 @@ SpellChecker *SpellCheckerFactory::GetSpellChecker() {
|
||||||
SpellChecker *checker = Create(list[i]);
|
SpellChecker *checker = Create(list[i]);
|
||||||
if (checker) return checker;
|
if (checker) return checker;
|
||||||
}
|
}
|
||||||
catch (wxString err) { error += list[i] + " factory: " + err + "\n"; }
|
catch (wxString const& err) { error += list[i] + " factory: " + err + "\n"; }
|
||||||
catch (const char *err) { error += list[i] + " factory: " + wxString(err) + "\n"; }
|
catch (const char *err) { error += list[i] + " factory: " + wxString(err) + "\n"; }
|
||||||
catch (...) { error += list[i] + " factory: Unknown error\n"; }
|
catch (...) { error += list[i] + " factory: Unknown error\n"; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ void TTXTSubtitleFormat::ReadFile(AssFile *target, wxString const& filename, wxS
|
||||||
for (wxXmlNode *child = doc.GetRoot()->GetChildren(); child; child = child->GetNext()) {
|
for (wxXmlNode *child = doc.GetRoot()->GetChildren(); child; child = child->GetNext()) {
|
||||||
// Line
|
// Line
|
||||||
if (child->GetName() == "TextSample") {
|
if (child->GetName() == "TextSample") {
|
||||||
if (diag = ProcessLine(child, diag, version)) {
|
if ((diag = ProcessLine(child, diag, version))) {
|
||||||
lines++;
|
lines++;
|
||||||
target->Line.push_back(diag);
|
target->Line.push_back(diag);
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,13 +60,12 @@ SubtitlesProvider* SubtitlesProviderFactory::GetProvider() {
|
||||||
for (unsigned int i=0;i<list.size();i++) {
|
for (unsigned int i=0;i<list.size();i++) {
|
||||||
try {
|
try {
|
||||||
size_t pos = list[i].find('/');
|
size_t pos = list[i].find('/');
|
||||||
std::string name = list[i].substr(0, pos);
|
|
||||||
std::string subType = pos < list[i].size() - 1 ? list[i].substr(pos + 1) : "";
|
std::string subType = pos < list[i].size() - 1 ? list[i].substr(pos + 1) : "";
|
||||||
SubtitlesProvider *provider = Create(list[i], subType);
|
SubtitlesProvider *provider = Create(list[i], subType);
|
||||||
if (provider) return provider;
|
if (provider) return provider;
|
||||||
}
|
}
|
||||||
catch (agi::UserCancelException const&) { throw; }
|
catch (agi::UserCancelException const&) { throw; }
|
||||||
catch (wxString err) { error += list[i] + " factory: " + err + "\n"; }
|
catch (wxString const& err) { error += list[i] + " factory: " + err + "\n"; }
|
||||||
catch (const char *err) { error += list[i] + " factory: " + wxString(err) + "\n"; }
|
catch (const char *err) { error += list[i] + " factory: " + wxString(err) + "\n"; }
|
||||||
catch (...) { error += list[i] + " factory: Unknown error\n"; }
|
catch (...) { error += list[i] + " factory: Unknown error\n"; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,8 +54,8 @@ void DummyVideoProvider::Create(double fps, int frames, int width, int height, u
|
||||||
|
|
||||||
unsigned char *dst = frame.data;
|
unsigned char *dst = frame.data;
|
||||||
unsigned char colors[2][4] = {
|
unsigned char colors[2][4] = {
|
||||||
blue, green, red, 0,
|
{ blue, green, red, 0 },
|
||||||
0, 0, 0, 0
|
{ 0, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
if (pattern) {
|
if (pattern) {
|
||||||
|
|
Loading…
Reference in New Issue