Browse Source

style

cl-refactor
arkpar 10 years ago
parent
commit
d8673daa5b
  1. 3
      mix/ClientModel.cpp
  2. 13
      mix/CodeModel.cpp
  3. 5
      mix/CodeModel.h

3
mix/ClientModel.cpp

@ -394,14 +394,13 @@ void ClientModel::showDebuggerForTransaction(ExecutionResult const& _t)
QStringList storage;
for(auto st: s.storage)
{
if (st.first < std::numeric_limits<unsigned>::max())
{
auto storageIter = contract->storage().find(static_cast<unsigned>(st.first));
if (storageIter != contract->storage().end())
storage.push_back(storageIter.value().name + "\t" + formatValue(storageIter.value().type, st.second));
}
}
prevInstructionIndex = instructionIndex;
solState = new QSolState(debugData, storage, solCallStack, locals, instruction.getLocation().start, instruction.getLocation().end);
}

13
mix/CodeModel.cpp

@ -56,12 +56,6 @@ namespace
CollectDeclarationsVisitor(QHash<LocationPair, QString>* _functions, QHash<LocationPair, SolidityDeclaration>* _locals, QHash<unsigned, SolidityDeclaration>* _storage):
m_functions(_functions), m_locals(_locals), m_storage(_storage), m_functionScope(false), m_storageSlot(0) {}
private:
QHash<LocationPair, QString>* m_functions;
QHash<LocationPair, SolidityDeclaration>* m_locals;
QHash<unsigned, SolidityDeclaration>* m_storage;
bool m_functionScope;
uint m_storageSlot;
LocationPair nodeLocation(ASTNode const& _node)
{
return LocationPair(_node.getLocation().start, _node.getLocation().end);
@ -128,6 +122,13 @@ namespace
m_storage->insert(m_storageSlot++, decl);
return true;
}
private:
QHash<LocationPair, QString>* m_functions;
QHash<LocationPair, SolidityDeclaration>* m_locals;
QHash<unsigned, SolidityDeclaration>* m_storage;
bool m_functionScope;
uint m_storageSlot;
};
}

5
mix/CodeModel.h

@ -37,10 +37,7 @@ class QTextDocument;
namespace dev
{
namespace solidity
{
class CompilerStack;
}
namespace solidity { class CompilerStack; }
namespace mix
{

Loading…
Cancel
Save