Fix compilation with clang (but not linking because wxAny is currently broken with it)
Originally committed to SVN as r5826.
This commit is contained in:
parent
8b5545c98f
commit
2f394a7792
12 changed files with 21 additions and 22 deletions
|
@ -34,7 +34,7 @@
|
|||
#include "libaegisub/line_iterator.h"
|
||||
|
||||
namespace std {
|
||||
template<> void swap(agi::vfr::Framerate &lft, agi::vfr::Framerate &rgt) throw() {
|
||||
template<> void swap(agi::vfr::Framerate &lft, agi::vfr::Framerate &rgt) {
|
||||
lft.swap(rgt);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ public:
|
|||
|
||||
/// @brief DOCME
|
||||
///
|
||||
ASS_EntryType GetType() { return ENTRY_ATTACHMENT; }
|
||||
ASS_EntryType GetType() const { return ENTRY_ATTACHMENT; }
|
||||
AssEntry *Clone() const;
|
||||
|
||||
AssAttachment(wxString name);
|
||||
|
|
|
@ -91,7 +91,7 @@ namespace Aegisub {
|
|||
/// @brief DOCME
|
||||
/// @return
|
||||
///
|
||||
const char *GetName() { return "internal_error/invalid_margin_id"; }
|
||||
const char *GetName() const { return "internal_error/invalid_margin_id"; }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -60,8 +60,8 @@
|
|||
#include "video_context.h"
|
||||
|
||||
class AudioMarkerKeyframe : public AudioMarker {
|
||||
int64_t position;
|
||||
Pen *style;
|
||||
int64_t position;
|
||||
public:
|
||||
AudioMarkerKeyframe(Pen *style, int64_t position) : style(style), position(position) { }
|
||||
int64_t GetPosition() const { return position; }
|
||||
|
@ -140,8 +140,8 @@ public:
|
|||
};
|
||||
|
||||
class VideoPositionMarker : public AudioMarker {
|
||||
int64_t position;
|
||||
Pen style;
|
||||
int64_t position;
|
||||
|
||||
public:
|
||||
VideoPositionMarker()
|
||||
|
|
|
@ -93,9 +93,9 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
if (src_bytes_per_sample > sizeof(Target))
|
||||
if (static_cast<size_t>(src_bytes_per_sample) > sizeof(Target))
|
||||
sample >>= (src_bytes_per_sample - sizeof(Target)) * 8;
|
||||
else if (src_bytes_per_sample < sizeof(Target))
|
||||
else if (static_cast<size_t>(src_bytes_per_sample) < sizeof(Target))
|
||||
sample <<= (sizeof(Target) - src_bytes_per_sample ) * 8;
|
||||
|
||||
dest[i] = (Target)sample;
|
||||
|
|
|
@ -208,7 +208,7 @@ namespace Automation4 {
|
|||
config_dialog = 0;
|
||||
}
|
||||
|
||||
if (config_dialog = GenerateConfigDialog(parent, c)) {
|
||||
if ((config_dialog = GenerateConfigDialog(parent, c))) {
|
||||
wxString val = c->ass->GetScriptInfo(GetScriptSettingsIdentifier());
|
||||
if (!val.empty())
|
||||
config_dialog->Unserialise(val);
|
||||
|
|
|
@ -183,7 +183,7 @@ struct grid_swap_up : public Command {
|
|||
STR_HELP("Move the selected line up one row")
|
||||
CMD_TYPE(COMMAND_VALIDATE)
|
||||
|
||||
bool Validate(agi::Context *c) {
|
||||
bool Validate(const agi::Context *c) {
|
||||
return c->selectionController->GetActiveLine() != 0;
|
||||
}
|
||||
|
||||
|
@ -203,15 +203,15 @@ struct grid_swap_down : public Command {
|
|||
STR_HELP("Move the selected line down one row")
|
||||
CMD_TYPE(COMMAND_VALIDATE)
|
||||
|
||||
bool Validate(agi::Context *c) {
|
||||
bool Validate(const agi::Context *c) {
|
||||
return c->selectionController->GetActiveLine() != 0;
|
||||
}
|
||||
|
||||
void operator()(agi::Context *c) {
|
||||
if (AssDialogue *line = c->selectionController->GetActiveLine()) {
|
||||
if (move_one(c->ass->Line.begin(), c->ass->Line.end(), line))
|
||||
c->ass->Commit(_("swap lines"), AssFile::COMMIT_ORDER);
|
||||
}
|
||||
void operator()(agi::Context *c) {
|
||||
if (AssDialogue *line = c->selectionController->GetActiveLine()) {
|
||||
if (move_one(c->ass->Line.begin(), c->ass->Line.end(), line))
|
||||
c->ass->Commit(_("swap lines"), AssFile::COMMIT_ORDER);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ struct tool_style_assistant : public Command {
|
|||
struct tool_styling_assistant_validator : public Command {
|
||||
CMD_TYPE(COMMAND_VALIDATE)
|
||||
|
||||
bool Validate(agi::Context *c) {
|
||||
bool Validate(const agi::Context *c) {
|
||||
return !!c->stylingAssistant;
|
||||
}
|
||||
};
|
||||
|
@ -237,7 +237,7 @@ struct tool_translation_assistant : public Command {
|
|||
struct tool_translation_assistant_validator : public Command {
|
||||
CMD_TYPE(COMMAND_VALIDATE)
|
||||
|
||||
bool Validate(agi::Context *c) {
|
||||
bool Validate(const agi::Context *c) {
|
||||
return !!c->translationAssistant;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -180,7 +180,7 @@ void DialogExport::OnChange(wxCommandEvent &) {
|
|||
|
||||
// Swap the items at idx and idx + 1
|
||||
static void swap(wxCheckListBox *list, int idx, int sel_dir) {
|
||||
if (idx < 0 || idx + 1 == list->GetCount()) return;
|
||||
if (idx < 0 || idx + 1 == (int)list->GetCount()) return;
|
||||
|
||||
list->Freeze();
|
||||
wxString tempname = list->GetString(idx);
|
||||
|
|
|
@ -116,7 +116,7 @@ public:
|
|||
|
||||
template<class T>
|
||||
static void Register(std::string name, bool hide = false, std::vector<std::string> subTypes = std::vector<std::string>()) {
|
||||
DoRegister(&Factory0<Base>::template create<T>, name, hide, subTypes);
|
||||
FactoryBase<func>::DoRegister(&Factory0<Base>::template create<T>, name, hide, subTypes);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -140,6 +140,6 @@ public:
|
|||
|
||||
template<class T>
|
||||
static void Register(std::string name, bool hide = false, std::vector<std::string> subTypes = std::vector<std::string>()) {
|
||||
DoRegister(&Factory1<Base, Arg1>::template create<T>, name, hide, subTypes);
|
||||
FactoryBase<func>::DoRegister(&Factory1<Base, Arg1>::template create<T>, name, hide, subTypes);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -45,7 +45,6 @@ void clear() {
|
|||
|
||||
static std::vector<std::string> keycode_names;
|
||||
|
||||
static std::string const& get_keycode_name(int code);
|
||||
static void init_keycode_names();
|
||||
|
||||
static std::string const& keycode_name(int code) {
|
||||
|
|
|
@ -704,7 +704,7 @@ void SubsEditBox::SetTag(wxString tag, wxString value, bool atEnd) {
|
|||
AssDialogueBlock *block = line->Blocks[blockn];
|
||||
if (dynamic_cast<AssDialogueBlockDrawing*>(block))
|
||||
--blockn;
|
||||
else if (plain = dynamic_cast<AssDialogueBlockPlain*>(block)) {
|
||||
else if ((plain = dynamic_cast<AssDialogueBlockPlain*>(block))) {
|
||||
// Cursor is in a comment block, so try the previous block instead
|
||||
if (plain->GetText().StartsWith("{")) {
|
||||
--blockn;
|
||||
|
|
Loading…
Reference in a new issue