Skip to content

Commit

Permalink
Рефакторинг: упрощение класса refalrts::Domain::Stack (#266)
Browse files Browse the repository at this point in the history
• Конструктор без параметров не использовался.
• Поле stat не используется, поскольку оно же есть внутри модуля.
  • Loading branch information
Mazdaywik committed Feb 5, 2020
1 parent f6b6043 commit 801c52f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/lib/refalrts-dynamic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ refalrts::Module *refalrts::Domain::ModuleStorage::load_module(
m_domain, real_name, stat, load_success, event, callback_data, main_module
);

Stack substack(stat, module, stack);
Stack substack(module, stack);
bool ref_success = true;
for (
Module::ReferenceMap::iterator p = module->references().begin();
Expand Down
11 changes: 2 additions & 9 deletions src/lib/refalrts-dynamic.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,18 +237,11 @@ class Module {

class Domain {
struct Stack {
const api::stat *stat;
Module *module;
const Stack *next;

Stack()
: stat(0), module(0), next(0)
{
/* пусто */
}

Stack(const api::stat *stat, Module *module, const Stack *next)
: stat(stat), module(module), next(next)
Stack(Module *module, const Stack *next)
: module(module), next(next)
{
/* пусто */
}
Expand Down

0 comments on commit 801c52f

Please sign in to comment.