PuzzleD

D Interface to libpuzzle
git clone git://xatko.vsos.ethz.ch/PuzzleD.git
Log | Files | Refs

commit 31067621f4355da9229a1008e1026d3d32a9b359
parent f220f5ff26c3e9eafb8ccc6b921ffed523e2083a
Author: Dominik Schmidt <das1993@hotmail.com>
Date:   Thu, 27 Aug 2015 12:09:59 +0200

Move the Contract to the right constructor of CVec

Diffstat:
puzzle.d | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/puzzle.d b/puzzle.d @@ -159,15 +159,15 @@ struct CVec{ PuzzleCvec vec; PuzzleContext *ctx; @disable this(); - this(ref CVec_Compressed c) + this(ref CVec_Compressed c){ + this(c.ctx); + puzzle_uncompress_cvec(ctx, &c.vec, &vec); + } + this(PuzzleContext *ctx) in{ assert(ctx.valid(), "Context invalid"); } body{ - this(c.ctx); - puzzle_uncompress_cvec(ctx, &c.vec, &vec); - } - this(PuzzleContext *ctx){ this.ctx=ctx; puzzle_init_cvec(ctx,&vec); }