Skip to content

Commit de5aa3b

Browse files
authored
Update ext_ref.h
1 parent 0451bf3 commit de5aa3b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/mfast/ext_ref.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class ext_mref : public ext_ref_properties<OpType, Properties> {
211211

212212
ext_mref(field_mref other) : base_(std::move(other)) {}
213213
mref_type set() const {
214-
if (static_cast<mref_type*>(this)->optional()) {
214+
if (this->optional()) {
215215
value_storage *storage = field_mref_core_access::storage_of(this->base_);
216216
storage->present(true);
217217
}
@@ -224,9 +224,9 @@ class ext_mref : public ext_ref_properties<OpType, Properties> {
224224
;
225225
}
226226

227-
bool present() const { return !static_cast<mref_type*>(this)->optional() || base_.present(); }
227+
bool present() const { return !this->optional() || base_.present(); }
228228
void omit() const {
229-
if (static_cast<mref_type*>(this)->optional())
229+
if (this->optional())
230230
base_.omit();
231231
}
232232

@@ -341,16 +341,16 @@ class ext_mref<nested_message_mref, group_type_tag, Properties>
341341
explicit ext_mref(field_mref other) : base_(std::move(other)) {}
342342
cref_type get() const { return cref_type(aggregate_cref(base_)[0]); }
343343
mref_type set() const {
344-
if (static_cast<mref_type*>(this)->optional()) {
344+
if (this->optional()) {
345345
value_storage *storage = field_mref_core_access::storage_of(this->base_);
346346
storage->present(true);
347347
}
348348
return mref_type(aggregate_mref(base_)[0]);
349349
}
350350

351-
bool present() const { return !static_cast<mref_type*>(this)->optional() || base_.present(); }
351+
bool present() const { return !this->optional() || base_.present(); }
352352
void omit() const {
353-
if (static_cast<mref_type*>(this)->optional())
353+
if (this->optional())
354354
base_.omit();
355355
}
356356

0 commit comments

Comments
 (0)