Skip to content

Commit

Permalink
Merge pull request #10 from jserv/cleanup-duplicated
Browse files Browse the repository at this point in the history
Remove duplicated TryteAlphabet and code cleanup
  • Loading branch information
WEI, CHEN committed Mar 16, 2018
2 parents 8a2ffe3 + 09c514e commit a506ab2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/hash/curl.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Curl *initCurl()
{
Curl *c = (Curl *) malloc(sizeof(Curl));
if (!c)
return NULL;
return NULL;

signed char src[STATE_LENGTH] = {0};
c->state = initTrits(src, STATE_LENGTH);
Expand Down
3 changes: 1 addition & 2 deletions src/trinary/trinary.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

#include "trinary.h"
#include "../constants.h"
#include "../hash/curl.h"

static char TrytesToTritsMappings[][3] = {
Expand All @@ -14,8 +15,6 @@ static char TrytesToTritsMappings[][3] = {
{0, 0, -1}, {1, 0, -1}, {-1, 1, -1}, {0, 1, -1}, {1, 1, -1}, {-1, -1, 0},
{0, -1, 0}, {1, -1, 0}, {-1, 0, 0}};

static char TryteAlphabet[] = "9ABCDEFGHIJKLMNOPQRSTUVWXYZ";

void freeTrobject(Trobject_t *t)
{
if (t) {
Expand Down
12 changes: 0 additions & 12 deletions src/trinary/trinary.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,6 @@ typedef struct _trinary_object {
typedef Trobject_t Trits_t;
typedef Trobject_t Trytes_t;

/*
typedef struct _trits {
char *data;
int len;
} Trits_t;
typedef struct _trytes {
char *data;
int len;
} Trytes_t;
*/

Trobject_t *initTrits(signed char *src, int len);
Trobject_t *initTrytes(signed char *src, int len);

Expand Down

0 comments on commit a506ab2

Please sign in to comment.