mirror of https://github.com/odrling/Aegisub
Fixes for misc. compiler warnings.
Originally committed to SVN as r797.
This commit is contained in:
parent
a8abb99e6b
commit
818b31edc3
|
@ -231,7 +231,6 @@ void AudioSpectrum::RenderRange(__int64 range_start, __int64 range_end, bool sel
|
|||
{
|
||||
unsigned long first_line = (unsigned long)(range_start / line_length / 2);
|
||||
unsigned long last_line = (unsigned long)(range_end / line_length / 2);
|
||||
unsigned long lines_to_render = last_line - first_line + 1;
|
||||
|
||||
float *power = new float[line_length];
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ namespace Automation4 {
|
|||
|
||||
LOGFONTW lf;
|
||||
ZeroMemory(&lf, sizeof(lf));
|
||||
lf.lfHeight = fontsize;
|
||||
lf.lfHeight = (LONG)fontsize;
|
||||
lf.lfWeight = style->bold ? FW_BOLD : FW_NORMAL;
|
||||
lf.lfItalic = style->italic;
|
||||
lf.lfUnderline = style->underline;
|
||||
|
@ -131,7 +131,7 @@ namespace Automation4 {
|
|||
// USING wxTheFontList SEEMS TO CAUSE BAD LEAKS!
|
||||
//wxFont *thefont = wxTheFontList->FindOrCreateFont(
|
||||
wxFont thefont(
|
||||
fontsize,
|
||||
(int)fontsize,
|
||||
wxFONTFAMILY_DEFAULT,
|
||||
style->italic ? wxFONTSTYLE_ITALIC : wxFONTSTYLE_NORMAL,
|
||||
style->bold ? wxFONTWEIGHT_BOLD : wxFONTWEIGHT_NORMAL,
|
||||
|
@ -146,7 +146,7 @@ namespace Automation4 {
|
|||
for (unsigned int i = 0; i < text.length(); i++) {
|
||||
int a, b, c, d;
|
||||
thedc.GetTextExtent(text[i], &a, &b, &c, &d);
|
||||
width += a + style->spacing;
|
||||
width += a + (int)style->spacing;
|
||||
height = b > height ? b : height;
|
||||
descent = c > descent ? c : descent;
|
||||
extlead= d > extlead ? d : extlead;
|
||||
|
|
|
@ -170,6 +170,7 @@ namespace Automation4 {
|
|||
|
||||
public:
|
||||
ScriptConfigDialog() : win(0) { }
|
||||
virtual ~ScriptConfigDialog() { }
|
||||
wxWindow* GetWindow(wxWindow *parent);
|
||||
void DeleteWindow();
|
||||
virtual void ReadBack() = 0;
|
||||
|
@ -245,8 +246,8 @@ namespace Automation4 {
|
|||
void SetTitle(const wxString &_title);
|
||||
void AddDebugOutput(const wxString &msg);
|
||||
|
||||
volatile bool has_inited;
|
||||
volatile bool script_finished;
|
||||
volatile bool has_inited;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
@ -327,6 +328,7 @@ namespace Automation4 {
|
|||
static std::vector<ScriptFactory*> *factories;
|
||||
protected:
|
||||
ScriptFactory() { }
|
||||
virtual ~ScriptFactory() { }
|
||||
wxString engine_name;
|
||||
wxString filename_pattern;
|
||||
public:
|
||||
|
|
|
@ -517,9 +517,9 @@ namespace Automation4 {
|
|||
}
|
||||
|
||||
LuaFeatureMacro::LuaFeatureMacro(const wxString &_name, const wxString &_description, lua_State *_L)
|
||||
: LuaFeature(_L, SCRIPTFEATURE_MACRO, _name)
|
||||
: Feature(SCRIPTFEATURE_MACRO, _name)
|
||||
, FeatureMacro(_name, _description)
|
||||
, Feature(SCRIPTFEATURE_MACRO, _name)
|
||||
, LuaFeature(_L, SCRIPTFEATURE_MACRO, _name)
|
||||
{
|
||||
// new table for containing the functions for this feature
|
||||
lua_newtable(L);
|
||||
|
@ -590,9 +590,9 @@ namespace Automation4 {
|
|||
// LuaFeatureFilter
|
||||
|
||||
LuaFeatureFilter::LuaFeatureFilter(const wxString &_name, const wxString &_description, int merit, lua_State *_L)
|
||||
: LuaFeature(_L, SCRIPTFEATURE_FILTER, _name)
|
||||
: Feature(SCRIPTFEATURE_FILTER, _name)
|
||||
, FeatureFilter(_name, _description, merit)
|
||||
, Feature(SCRIPTFEATURE_FILTER, _name)
|
||||
, LuaFeature(_L, SCRIPTFEATURE_FILTER, _name)
|
||||
{
|
||||
// Works the same as in LuaFeatureMacro
|
||||
lua_newtable(L);
|
||||
|
@ -837,6 +837,8 @@ namespace Automation4 {
|
|||
Register(this);
|
||||
}
|
||||
|
||||
~LuaScriptFactory() { }
|
||||
|
||||
virtual Script* Produce(const wxString &filename) const
|
||||
{
|
||||
// Just check if file extension is .lua
|
||||
|
|
|
@ -122,6 +122,7 @@ namespace Automation4 {
|
|||
virtual void LuaReadBack(lua_State *L) = 0;
|
||||
|
||||
LuaConfigDialogControl(lua_State *L);
|
||||
virtual ~LuaConfigDialogControl() { }
|
||||
};
|
||||
|
||||
class LuaConfigDialog : public ScriptConfigDialog {
|
||||
|
|
|
@ -123,6 +123,8 @@ namespace Automation4 {
|
|||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
virtual ~Label() { }
|
||||
|
||||
wxControl *Create(wxWindow *parent)
|
||||
{
|
||||
return cw = new wxStaticText(parent, -1, label);
|
||||
|
@ -155,6 +157,8 @@ namespace Automation4 {
|
|||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
virtual ~Edit() { }
|
||||
|
||||
wxControl *Create(wxWindow *parent)
|
||||
{
|
||||
return cw = new wxTextCtrl(parent, -1, text, wxDefaultPosition, wxDefaultSize, 0);
|
||||
|
@ -184,6 +188,8 @@ namespace Automation4 {
|
|||
// Nothing more
|
||||
}
|
||||
|
||||
virtual ~Textbox() { }
|
||||
|
||||
wxControl *Create(wxWindow *parent)
|
||||
{
|
||||
cw = new wxTextCtrl(parent, -1, text, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE);
|
||||
|
@ -230,6 +236,8 @@ nospin:
|
|||
}
|
||||
}
|
||||
|
||||
virtual ~IntEdit() { }
|
||||
|
||||
typedef wxValidator IntTextValidator; // TODO
|
||||
wxControl *Create(wxWindow *parent)
|
||||
{
|
||||
|
@ -278,6 +286,8 @@ nospin:
|
|||
// TODO: spin button support
|
||||
}
|
||||
|
||||
virtual ~FloatEdit() { }
|
||||
|
||||
typedef wxValidator FloatTextValidator;
|
||||
wxControl *Create(wxWindow *parent)
|
||||
{
|
||||
|
@ -326,6 +336,8 @@ nospin:
|
|||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
virtual ~Dropdown() { }
|
||||
|
||||
wxControl *Create(wxWindow *parent)
|
||||
{
|
||||
return cw = new wxComboBox(parent, -1, value, wxDefaultPosition, wxDefaultSize, items, wxCB_READONLY);
|
||||
|
@ -363,6 +375,8 @@ nospin:
|
|||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
virtual ~Checkbox() { }
|
||||
|
||||
wxControl *Create(wxWindow *parent)
|
||||
{
|
||||
return cw = new wxCheckBox(parent, -1, label);
|
||||
|
|
|
@ -34,9 +34,6 @@
|
|||
//
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
////////////
|
||||
// Includes
|
||||
#include "base_grid.h"
|
||||
|
|
|
@ -241,6 +241,7 @@ void hsv_to_rgb(int H, int S, int V, unsigned char *R, unsigned char *G, unsigne
|
|||
b = v;
|
||||
break;
|
||||
case 5:
|
||||
default:
|
||||
r = v;
|
||||
g = p;
|
||||
b = q;
|
||||
|
|
Loading…
Reference in New Issue