Skip to content

Commit 45af6c5

Browse files
committed
Fix a few compiler warnings
1 parent a817948 commit 45af6c5

File tree

6 files changed

+9
-15
lines changed

6 files changed

+9
-15
lines changed

libaegisub/common/karaoke_matcher.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include "libaegisub/ass/karaoke.h"
2020
#include "libaegisub/exception.h"
2121
#include "libaegisub/kana_table.h"
22-
#include "libaegisub/scoped_ptr.h"
2322
#include "libaegisub/util.h"
2423

2524
#include <boost/algorithm/string/case_conv.hpp>
@@ -30,16 +29,6 @@
3029
#include <unicode/utf8.h>
3130

3231
namespace {
33-
int32_t next_codepoint(const char *str, size_t *i) {
34-
UChar32 c;
35-
U8_NEXT_UNSAFE(str, *i, c);
36-
return c;
37-
}
38-
39-
bool is_whitespace(int32_t c) {
40-
return !!u_isUWhiteSpace(c);
41-
}
42-
4332
bool is_whitespace(std::string_view str) {
4433
size_t i = 0;
4534
while (i < str.size()) {

src/auto4_lua_assfile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ namespace Automation4 {
764764
, can_modify(can_modify)
765765
, can_set_undo(can_set_undo)
766766
{
767-
for (auto& line : ass->Info)
767+
for ([[maybe_unused]] auto& line : ass->Info)
768768
lines.push_back(nullptr);
769769
for (auto& line : ass->Styles)
770770
lines.push_back(&line);

src/hotkey.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@ namespace {
4747
{nullptr}
4848
};
4949

50+
#ifdef __WXMAC__
5051
const char *added_hotkeys_minimize[][3] = {
5152
{"app/minimize", "Default", "Ctrl-M"},
5253
{nullptr}
5354
};
55+
#endif
5456

5557
void migrate_hotkeys(const char *added[][3]) {
5658
auto hk_map = hotkey::inst->GetHotkeyMap();

src/placeholder_ctrl.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ class Placeholder final : public BaseCtrl {
7777
/// @param new_value New value of the control
7878
///
7979
/// If new_value is empty, the control will switch to placeholder mode
80-
void ChangeValue(wxString new_value) {
80+
void ChangeValue(const wxString& value) override {
81+
wxString new_value = value;
8182
if (new_value.empty() && !this->HasFocus()) {
8283
is_placeholder = true;
8384
new_value = placeholder;
@@ -95,7 +96,7 @@ class Placeholder final : public BaseCtrl {
9596
}
9697

9798
/// Override GetValue to return empty when in placeholder mode rather than the placeholder text
98-
wxString GetValue() const {
99+
wxString GetValue() const override {
99100
if (is_placeholder && !this->HasFocus())
100101
return "";
101102
return BaseCtrl::GetValue();

src/retina_helper.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@
1919
class wxWindow;
2020

2121
class RetinaHelper {
22+
#ifdef __WXOSX_COCOA__
2223
wxWindow *window;
2324
void *observer;
25+
#endif
2426
agi::signal::Signal<int> ScaleFactorChanged;
2527
public:
2628
RetinaHelper(wxWindow *window);

src/subs_edit_ctrl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ SubsTextEditCtrl::SubsTextEditCtrl(wxWindow* parent, wxSize wsize, long style, a
128128
{
129129
std::string text = GetTextRaw().data();
130130
if (text == line_text) return;
131-
line_text = move(text);
131+
line_text = std::move(text);
132132
}
133133

134134
UpdateStyle();

0 commit comments

Comments
 (0)