forked from mia/Aegisub
Silence some clang warnings
Originally committed to SVN as r6558.
This commit is contained in:
parent
fed2a91598
commit
759b8433c1
14 changed files with 16 additions and 27 deletions
|
@ -88,7 +88,6 @@ void time_log(agi_timeval &tv) {
|
|||
|
||||
// Initialize the present time to 0 and the timezone to UTC
|
||||
unsigned __int64 tmpres = 0;
|
||||
static int tzflag = 0;
|
||||
|
||||
GetSystemTimeAsFileTime(&ft);
|
||||
|
||||
|
|
|
@ -300,9 +300,7 @@ void AssDialogue::ParseASSTags() {
|
|||
}
|
||||
// Drawing
|
||||
else {
|
||||
AssDialogueBlockDrawing *block = new AssDialogueBlockDrawing(work);
|
||||
block->Scale = drawingLevel;
|
||||
Blocks.push_back(block);
|
||||
Blocks.push_back(new AssDialogueBlockDrawing(work, drawingLevel));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ public:
|
|||
int Scale;
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
|
|
|
@ -57,10 +57,9 @@ AssColor::AssColor(int r, int g, int b, int a)
|
|||
{
|
||||
}
|
||||
|
||||
/// @brief DOCME
|
||||
/// @param color
|
||||
///
|
||||
AssColor::AssColor (const wxColour &color) {
|
||||
AssColor::AssColor(const wxColour &color)
|
||||
: a(0)
|
||||
{
|
||||
SetWXColor(color);
|
||||
}
|
||||
|
||||
|
|
|
@ -65,11 +65,6 @@ namespace {
|
|||
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)
|
||||
{
|
||||
return wxString(luaL_checkstring(L, idx), wxConvUTF8);
|
||||
|
|
|
@ -300,11 +300,10 @@ void DialogDummyVideo::OnLengthChange(wxCommandEvent &)
|
|||
void DialogDummyVideo::UpdateLengthDisplay()
|
||||
{
|
||||
double fpsval;
|
||||
int lengthval = 0;
|
||||
if (!length_display) return;
|
||||
bool valid = false;
|
||||
if (fps->GetValue().ToDouble(&fpsval)) {
|
||||
lengthval = length->GetValue();
|
||||
int lengthval = length->GetValue();
|
||||
if (lengthval && fpsval > 0 && lengthval > 0) {
|
||||
valid = true;
|
||||
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:
|
||||
{
|
||||
AssDialogueBlockDrawing block(curParam->Get<wxString>());
|
||||
AssDialogueBlockDrawing block(curParam->Get<wxString>(), 1);
|
||||
block.TransformCoords(m[0],m[2],rx,ry);
|
||||
curParam->Set(block.GetText());
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ void DialogResample::OnResample (wxCommandEvent &) {
|
|||
catch (const char *err) {
|
||||
wxLogMessage(err);
|
||||
}
|
||||
catch (wxString err) {
|
||||
catch (wxString const& err) {
|
||||
wxLogMessage(err);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -172,7 +172,7 @@ DialogStyleManager::DialogStyleManager(agi::Context *context)
|
|||
|
||||
// Catalog
|
||||
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"));
|
||||
CatalogDelete = new wxButton(this, -1, _("Delete"));
|
||||
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);
|
||||
return;
|
||||
}
|
||||
catch (wxString err) {
|
||||
catch (wxString const& err) {
|
||||
wxMessageBox(err, "Error", wxOK | wxICON_ERROR, NULL);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace {
|
|||
{ "grid/move/up", "Default", "Alt", "Up" },
|
||||
{ "grid/line/next/create", "Subtitle Edit Box", "Enter", 0 },
|
||||
{ "grid/line/next/create", "Subtitle Edit Box", "KP_Enter", 0 },
|
||||
0
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
void migrate_hotkeys(const char *removed[], const char *added[][4]) {
|
||||
|
|
|
@ -59,7 +59,7 @@ SpellChecker *SpellCheckerFactory::GetSpellChecker() {
|
|||
SpellChecker *checker = Create(list[i]);
|
||||
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 (...) { 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()) {
|
||||
// Line
|
||||
if (child->GetName() == "TextSample") {
|
||||
if (diag = ProcessLine(child, diag, version)) {
|
||||
if ((diag = ProcessLine(child, diag, version))) {
|
||||
lines++;
|
||||
target->Line.push_back(diag);
|
||||
}
|
||||
|
|
|
@ -60,13 +60,12 @@ SubtitlesProvider* SubtitlesProviderFactory::GetProvider() {
|
|||
for (unsigned int i=0;i<list.size();i++) {
|
||||
try {
|
||||
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) : "";
|
||||
SubtitlesProvider *provider = Create(list[i], subType);
|
||||
if (provider) return provider;
|
||||
}
|
||||
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 (...) { 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 colors[2][4] = {
|
||||
blue, green, red, 0,
|
||||
0, 0, 0, 0
|
||||
{ blue, green, red, 0 },
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
if (pattern) {
|
||||
|
|
Loading…
Reference in a new issue