Skip to content

Commit c16ea61

Browse files
authored
Make use of maybe_unused in WindowChannel (#258)
1 parent c42525b commit c16ea61

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

shell/platform/tizen/channels/window_channel.cc

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
#pragma clang diagnostic push
6-
#pragma clang diagnostic ignored "-Wunused-private-field"
75
#include "window_channel.h"
8-
#pragma clang diagnostic pop
96

107
#include "flutter/shell/platform/common/client_wrapper/include/flutter/standard_method_codec.h"
118
#include "flutter/shell/platform/tizen/channels/encodable_value_holder.h"
@@ -25,9 +22,11 @@ WindowChannel::WindowChannel(BinaryMessenger* messenger,
2522
: renderer_(renderer), delegate_(delegate) {
2623
channel_ = std::make_unique<MethodChannel<EncodableValue>>(
2724
messenger, kChannelName, &StandardMethodCodec::GetInstance());
28-
channel_->SetMethodCallHandler([this](const auto& call, auto result) {
29-
this->HandleMethodCall(call, std::move(result));
30-
});
25+
channel_->SetMethodCallHandler(
26+
[this](const MethodCall<EncodableValue>& call,
27+
std::unique_ptr<MethodResult<EncodableValue>> result) {
28+
this->HandleMethodCall(call, std::move(result));
29+
});
3130
}
3231

3332
WindowChannel::~WindowChannel() {}
@@ -47,10 +46,10 @@ void WindowChannel::HandleMethodCall(
4746
result->Success(EncodableValue(map));
4847
} else if (method_name == "setWindowGeometry") {
4948
#ifdef TIZEN_RENDERER_EVAS_GL
50-
FT_LOG(Error) << "setWindowGeometry is not supported on evas_gl.";
49+
FT_LOG(Error) << "setWindowGeometry is not supported on Evas GL.";
5150
result->NotImplemented();
5251
#else
53-
auto arguments = std::get_if<EncodableMap>(method_call.arguments());
52+
const auto* arguments = std::get_if<EncodableMap>(method_call.arguments());
5453
if (!arguments) {
5554
result->Error("Invalid arguments");
5655
return;

shell/platform/tizen/channels/window_channel.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ class WindowChannel {
3131
// A reference to the renderer object managed by FlutterTizenEngine.
3232
// This can be nullptr if the engine is running in headless mode.
3333
TizenRenderer* renderer_;
34-
TizenRenderer::Delegate* delegate_;
34+
35+
[[maybe_unused]] TizenRenderer::Delegate* delegate_;
3536
};
3637

3738
} // namespace flutter

0 commit comments

Comments
 (0)