Skip to content

Commit 5846713

Browse files
committed
fix lint
1 parent 88a0c9d commit 5846713

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

src/fsif/root_dir.hpp

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ class root_dir : public file
8080

8181
void init()
8282
{
83-
this->file::set_path_internal(std::string(this->base_file.constant.get().path()));
83+
this->file::set_path_internal(std::string(
84+
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)
85+
this->base_file.constant.get().path()
86+
));
87+
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)
8488
this->base_file.variable.get().set_path(this->root_directory + this->path());
8589
}
8690

@@ -128,62 +132,74 @@ class root_dir : public file
128132
void set_path_internal(std::string path_name) const override
129133
{
130134
this->file::set_path_internal(std::move(path_name));
135+
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)
131136
this->base_file.constant.get().set_path(this->root_directory + this->path());
132137
}
133138

134139
void open_internal(fsif::mode io_mode) override
135140
{
141+
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)
136142
this->base_file.variable.get().open(io_mode);
137143
}
138144

139145
void close_internal() const noexcept override
140146
{
147+
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)
141148
this->base_file.constant.get().close();
142149
}
143150

144151
std::vector<std::string> list_dir(size_t max_entries = 0) const override
145152
{
153+
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)
146154
return this->base_file.constant.get().list_dir(max_entries);
147155
}
148156

149157
size_t read_internal(utki::span<uint8_t> buf) const override
150158
{
159+
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)
151160
return this->base_file.constant.get().read(buf);
152161
}
153162

154163
size_t write_internal(utki::span<const uint8_t> buf) override
155164
{
165+
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)
156166
return this->base_file.variable.get().write(buf);
157167
}
158168

159169
size_t seek_forward_internal(size_t num_bytes_to_seek) const override
160170
{
171+
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)
161172
return this->base_file.constant.get().seek_forward(num_bytes_to_seek);
162173
}
163174

164175
size_t seek_backward_internal(size_t num_bytes_to_seek) const override
165176
{
177+
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)
166178
return this->base_file.constant.get().seek_backward(num_bytes_to_seek);
167179
}
168180

169181
void rewind_internal() const override
170182
{
183+
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)
171184
this->base_file.constant.get().rewind();
172185
}
173186

174187
void make_dir() override
175188
{
189+
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)
176190
this->base_file.variable.get().make_dir();
177191
}
178192

179193
bool exists() const override
180194
{
195+
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)
181196
return this->base_file.constant.get().exists();
182197
}
183198

184199
utki::unique_ref<file> spawn() override
185200
{
186201
return utki::make_unique<root_dir>(
202+
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)
187203
this->base_file.variable.get().spawn(), //
188204
this->root_directory
189205
);

0 commit comments

Comments
 (0)