Skip to content

Commit f7e46d2

Browse files
committed
fix TODO:
1 parent f9e8bcb commit f7e46d2

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/ruis/widget/label/padding.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ padding::padding(
8181
),
8282
// clang-format on
8383
params(std::move(padding_params)),
84-
inner_content(content_container.get())
84+
inner_content(std::move(content_container))
8585
{}
8686

8787
sides<real> padding::get_min_borders() const noexcept

src/ruis/widget/label/padding.hpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ class padding :
4040
private:
4141
parameters params;
4242

43-
// TODO: use shared_ref?
44-
// NOLINTNEXTLINE(clang-analyzer-webkit.NoUncountedMemberChecker, "false-positive")
45-
container& inner_content;
43+
utki::shared_ref<container> inner_content;
4644

4745
public:
4846
struct all_parameters {
@@ -76,12 +74,12 @@ class padding :
7674
*/
7775
container& content()
7876
{
79-
return this->inner_content;
77+
return this->inner_content.get();
8078
}
8179

8280
const container& content() const
8381
{
84-
return this->inner_content;
82+
return this->inner_content.get();
8583
}
8684

8785
/**

0 commit comments

Comments
 (0)