Skip to content

Commit 44b5140

Browse files
committed
Keep the consistency of type in apyds/ds.cc and atsds/ds.cc.
1 parent ae1f4b6 commit 44b5140

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

apyds/ds.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ auto term_ground(ds::term_t* term, ds::term_t* dictionary, const char* scope, in
7373
}
7474

7575
auto rule_ground(ds::rule_t* rule, ds::rule_t* dictionary, const char* scope, int length) -> std::unique_ptr<ds::rule_t> {
76-
ds::rule_t* result = reinterpret_cast<ds::rule_t*>(operator new(length));
76+
auto result = reinterpret_cast<ds::rule_t*>(operator new(length));
7777
if (result->ground(rule, dictionary, scope, reinterpret_cast<std::byte*>(result) + length) == nullptr) [[unlikely]] {
7878
operator delete(result);
7979
return std::unique_ptr<ds::rule_t>(nullptr);
@@ -82,7 +82,7 @@ auto rule_ground(ds::rule_t* rule, ds::rule_t* dictionary, const char* scope, in
8282
}
8383

8484
auto rule_match(ds::rule_t* rule_1, ds::rule_t* rule_2, int length) -> std::unique_ptr<ds::rule_t> {
85-
ds::rule_t* result = reinterpret_cast<ds::rule_t*>(operator new(length));
85+
auto result = reinterpret_cast<ds::rule_t*>(operator new(length));
8686
if (result->match(rule_1, rule_2, reinterpret_cast<std::byte*>(result) + length) == nullptr) [[unlikely]] {
8787
operator delete(result);
8888
return std::unique_ptr<ds::rule_t>(nullptr);

atsds/ds.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ auto term_ground(ds::term_t* term, ds::term_t* dictionary, const std::string& sc
8080

8181
auto rule_ground(ds::rule_t* rule, ds::rule_t* dictionary, const std::string& scope, int length) -> std::unique_ptr<ds::rule_t> {
8282
const char* scope_ptr = scope.size() != 0 ? scope.data() : nullptr;
83-
ds::rule_t* result = reinterpret_cast<ds::rule_t*>(operator new(length));
83+
auto result = reinterpret_cast<ds::rule_t*>(operator new(length));
8484
if (result->ground(rule, dictionary, scope_ptr, reinterpret_cast<std::byte*>(result) + length) == nullptr) [[unlikely]] {
8585
operator delete(result);
8686
return std::unique_ptr<ds::rule_t>(nullptr);
@@ -89,7 +89,7 @@ auto rule_ground(ds::rule_t* rule, ds::rule_t* dictionary, const std::string& sc
8989
}
9090

9191
auto rule_match(ds::rule_t* rule_1, ds::rule_t* rule_2, int length) -> std::unique_ptr<ds::rule_t> {
92-
ds::rule_t* result = reinterpret_cast<ds::rule_t*>(operator new(length));
92+
auto result = reinterpret_cast<ds::rule_t*>(operator new(length));
9393
if (result->match(rule_1, rule_2, reinterpret_cast<std::byte*>(result) + length) == nullptr) [[unlikely]] {
9494
operator delete(result);
9595
return std::unique_ptr<ds::rule_t>(nullptr);

0 commit comments

Comments
 (0)