Remove now unnecessary const_casts.
This commit is contained in:
@@ -423,7 +423,7 @@ void kiwi_solver_reset(KiwiSolver* s) {
|
||||
void kiwi_solver_dump(const KiwiSolver* s) {
|
||||
auto* solver = reinterpret_cast<const Solver*>(s);
|
||||
if (solver)
|
||||
const_cast<Solver*>(solver)->dump(); // upstream library defect
|
||||
solver->dump();
|
||||
}
|
||||
|
||||
char* kiwi_solver_dumps(const KiwiSolver* s) {
|
||||
@@ -431,7 +431,7 @@ char* kiwi_solver_dumps(const KiwiSolver* s) {
|
||||
if (!solver)
|
||||
return nullptr;
|
||||
|
||||
const auto str = const_cast<Solver*>(solver)->dumps(); // upstream library defect
|
||||
const auto str = solver->dumps(); // upstream library defect
|
||||
const auto buf_size = str.size() + 1;
|
||||
auto* buf = static_cast<char*>(std::malloc(buf_size));
|
||||
if (!buf)
|
||||
|
||||
Reference in New Issue
Block a user