Skip to content

Commit db9c799

Browse files
authored
Merge pull request #7962 from thomasspriggs/tas/const_cast_fixes
Fix a pair of issues where `const` was (unintentionally) cast away
2 parents 05ccb75 + 3986b03 commit db9c799

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cpp/cpp_using.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class cpp_usingt:public irept
2828

2929
const cpp_namet &name() const
3030
{
31-
return (cpp_namet &)find(ID_name);
31+
return (const cpp_namet &)find(ID_name);
3232
}
3333

3434
bool get_namespace() const

src/util/std_code.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1858,7 +1858,7 @@ class code_push_catcht:public codet
18581858
}
18591859

18601860
exception_listt &exception_list() {
1861-
return (exception_listt &)find(ID_exception_list).get_sub();
1861+
return (exception_listt &)add(ID_exception_list).get_sub();
18621862
}
18631863

18641864
const exception_listt &exception_list() const {

0 commit comments

Comments
 (0)