compilation fixes

Originally committed to SVN as r5824.
This commit is contained in:
Thomas Goyne 2011-11-07 04:14:09 +00:00
parent be77dc8307
commit 0aa553eb7c
8 changed files with 13 additions and 6 deletions

View File

@ -41,6 +41,10 @@
#include "ass_file.h"
#include "include/aegisub/context.h"
#ifndef AGI_PRE
#include <algorithm>
#endif
static inline std::list<AssExportFilter*>::const_iterator filter_list_begin() {
return AssExportFilterChain::GetFilterList()->begin();
}

View File

@ -734,7 +734,7 @@ void AudioDisplay::ReloadRenderingSettings()
// FFTW is so fast we can afford to upgrade quality by two levels
spectrum_quality += 2;
#endif
spectrum_quality = mid(0LL, spectrum_quality, 5LL);
spectrum_quality = mid<int64_t>(0, spectrum_quality, 5);
// Quality indexes: 0 1 2 3 4 5
int spectrum_width[] = {8, 9, 9, 9, 10, 11};

View File

@ -88,7 +88,7 @@ namespace {
inline void get_if_right_type(lua_State *L, int &def)
{
if (lua_isnumber(L, -1))
def = std::max(lua_tointeger(L, -1), def);
def = std::max<int>(lua_tointeger(L, -1), def);
}
inline void get_if_right_type(lua_State *L, bool &def)

View File

@ -22,6 +22,7 @@
#ifndef AGI_PRE
#include <map>
#include <string>
#include <vector>
#include <wx/bitmap.h>
#include <wx/string.h>

View File

@ -397,7 +397,7 @@ void KaraokeLineMatchDisplay::IncreaseSourceMatch()
void KaraokeLineMatchDisplay::DecreaseSourceMatch()
{
source_sel_length = std::max(source_sel_length, 1u) - 1;
source_sel_length = std::max<size_t>(source_sel_length, 1) - 1;
Refresh(true);
}
@ -409,7 +409,7 @@ void KaraokeLineMatchDisplay::IncreseDestinationMatch()
void KaraokeLineMatchDisplay::DecreaseDestinationMatch()
{
destination_sel_length = std::max(destination_sel_length, 1u) - 1;
destination_sel_length = std::max<size_t>(destination_sel_length, 1) - 1;
Refresh(true);
}

View File

@ -38,6 +38,7 @@
#include <wx/dataview.h>
#include <wx/regex.h>
#include <list>
#include <set>
#endif

View File

@ -441,14 +441,14 @@ Vector2D VisualToolBase::GetLinePosition(AssDialogue *diag) {
x = margin[0];
else if (hor == 1)
x = (script_res.X() + margin[0] - margin[1]) / 2;
else if (hor == 2)
else
x = margin[1];
if (vert == 0)
y = script_res.Y() - margin[2];
else if (vert == 1)
y = script_res.Y() / 2;
else if (vert == 2)
else
y = margin[2];
return Vector2D(x, y);

View File

@ -24,6 +24,7 @@
#ifndef AGI_PRE
#include <deque>
#include <list>
#include <map>
#include <set>
#include <vector>