Browse Source

Style fixes (mostly)

cl-refactor
Paweł Bylica 10 years ago
parent
commit
c7526d0d95
  1. 4
      libevm/VM.h
  2. 14
      libevm/VMFace.h
  3. 3
      libevm/VMFactory.cpp
  4. 3
      libevm/VMFactory.h

4
libevm/VM.h

@ -49,7 +49,7 @@ inline u256 fromAddress(Address _a)
/**
*/
class VM : public VMFace
class VM: public VMFace
{
public:
virtual void reset(u256 _gas = 0) noexcept override final;
@ -68,7 +68,7 @@ private:
friend class VMFactory;
/// Construct VM object.
explicit VM(u256 _gas = 0) : VMFace(_gas) {}
explicit VM(u256 _gas = 0): VMFace(_gas) {}
template <class Ext>
bytesConstRef goImpl(Ext& _ext, OnOpFunc const& _onOp = OnOpFunc(), uint64_t _steps = (uint64_t)-1);

14
libevm/VMFace.h

@ -26,13 +26,13 @@ namespace dev
namespace eth
{
struct VMException : virtual Exception {};
struct StepsDone : virtual VMException {};
struct BreakPointHit : virtual VMException {};
struct BadInstruction : virtual VMException {};
struct BadJumpDestination : virtual VMException {};
struct OutOfGas : virtual VMException {};
struct StackTooSmall : virtual public VMException {};
struct VMException: virtual Exception {};
struct StepsDone: virtual VMException {};
struct BreakPointHit: virtual VMException {};
struct BadInstruction: virtual VMException {};
struct BadJumpDestination: virtual VMException {};
struct OutOfGas: virtual VMException {};
struct StackTooSmall: virtual VMException {};
/**
*/

3
libevm/VMFactory.cpp

@ -16,7 +16,6 @@
*/
#include "VMFactory.h"
#include <cassert>
#include "VM.h"
namespace dev
@ -35,7 +34,7 @@ void VMFactory::setKind(VMKind _kind)
std::unique_ptr<VMFace> VMFactory::create(u256 _gas)
{
assert(g_kind == VMKind::Interpreter && "Only interpreter supported for now");
asserts(g_kind == VMKind::Interpreter && "Only interpreter supported for now");
return std::unique_ptr<VMFace>(new VM(_gas));
}

3
libevm/VMFactory.h

@ -14,6 +14,7 @@
You should have received a copy of the GNU General Public License
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "VMFace.h"
@ -22,7 +23,7 @@ namespace dev
namespace eth
{
enum class VMKind : bool
enum class VMKind: bool
{
Interpreter,
JIT

Loading…
Cancel
Save