Skip to content

Commit

Permalink
refactor(lib): remove unused instruction reduce
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasanchez committed May 11, 2022
1 parent 5b28df2 commit b7e52bf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
9 changes: 0 additions & 9 deletions lib/inc/instruction/instruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,6 @@ void *instruction_to_stream(void *instruction);
*/
instruction_t *instruction_from_stream(void *stream);

/**
* @brief Reduces an instruction into a buffer.
*
* @param buffer the accumulator
* @param next the next instruction
* @return the accumulator
*/
void *instruction_reduce(void *buffer, void *next);

/**
* @brief List instructions from a stream.
*
Expand Down
11 changes: 0 additions & 11 deletions lib/src/instruction/instruction.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#include "conexion.h"
#include "smartlist.h"

// Global Variable for list operations
size_t _instruction_offset = 0lu;

// ============================================================================================================
// ***** Public Functions *****
// ============================================================================================================
Expand Down Expand Up @@ -84,14 +81,6 @@ instruction_t *instruction_from_stream(void *stream)
return instruction_create(_icode, _param0, _param1);
}

void *instruction_reduce(void *buffer, void *next)
{
size_t offset = sizeof(instruction_t);
memcpy(&buffer + _instruction_offset, next, offset);
_instruction_offset += offset;
return buffer;
}

void *instruction_list_from(void *stream)
{
t_list *list = list_create();
Expand Down

0 comments on commit b7e52bf

Please sign in to comment.