Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Dennis Eichhorn 2022-11-20 14:02:11 +01:00
commit fd97920115
3 changed files with 184 additions and 180 deletions

View File

@ -15,8 +15,10 @@
#include <string.h>
#include <inttypes.h>
namespace Stdlib {
namespace HashTable {
namespace Stdlib
{
namespace HashTable
{
typedef struct {
const char *key;
void *value;
@ -213,7 +215,7 @@ namespace Stdlib {
free(table->entries);
}
};
}
}
#endif

View File

@ -13,8 +13,10 @@
#include <stdio.h>
#include <stdlib.h>
namespace Utils {
namespace ArraySort {
namespace Utils
{
namespace ArraySort
{
inline
void reverse_int(int *arr, int size)
{

View File

@ -22,7 +22,7 @@ namespace Utils {
inline
char *search_replace(const char *haystack, const char *needle, const char *replace)
{
const char* haystackT = haystack;
const char *haystackT = haystack;
size_t i;
size_t match = 0;
@ -83,7 +83,7 @@ namespace Utils {
int size;
} text_diff;
text_diff computeLCSDiff (char **from, int fromSize, char **to, int toSize)
text_diff computeLCSDiff(char **from, int fromSize, char **to, int toSize)
{
char **diffValues = (char **) malloc(fromSize * toSize * sizeof(char *));
int *diffMasks = (int *) calloc(fromSize * toSize, sizeof(int));
@ -210,7 +210,7 @@ namespace Utils {
ArraySort::reverse_char(diffValues, diffIndex);
ArraySort::reverse_int(diffMasks, diffIndex);
return text_diff { diffValues, diffMasks, diffIndex };
return text_diff{diffValues, diffMasks, diffIndex};
}
}
}