test namespace only

This commit is contained in:
Dennis Eichhorn 2022-09-17 01:00:19 +02:00
parent 24cf23f026
commit 04ab177b23
4 changed files with 258 additions and 277 deletions

View File

@ -117,18 +117,16 @@
namespace Hash {
namespace Meow {
#if !defined(MEOW_HASH_X64_AESNI_H)
#define MEOW_HASH_VERSION 5
#define MEOW_HASH_VERSION_NAME "0.5/calico"
#if !defined(meow_u8)
#if _MSC_VER
#if !defined(__clang__)
#define INSTRUCTION_REORDER_BARRIER _ReadWriteBarrier()
#else
#endif
#include <intrin.h>
#else
#include <x86intrin.h>
@ -166,7 +164,6 @@ namespace Hash {
#if !defined MEOW_PREFETCH_LIMIT
#define MEOW_PREFETCH_LIMIT 0x3ff
#endif
#endif
#define prefetcht0(A) _mm_prefetch((char *)(A), _MM_HINT_T0)
@ -742,9 +739,6 @@ namespace Hash {
}
MeowEnd(&State, SeedResult);
}
#define MEOW_HASH_X64_AESNI_H
#endif
}
}
#endif

View File

@ -17,11 +17,8 @@
#include "StringUtils.h"
namespace Utils {
class ArrayUtils {
private:
public:
static inline
namespace ArrayUtils {
inline
char* get_arg(const char *id, char **argv, int length)
{
if (Utils::StringUtils::is_number(id)) {
@ -37,7 +34,7 @@ namespace Utils {
return NULL;
}
static inline
inline
bool has_arg(const char *id, char **argv, int length)
{
for (int i = 0; i < length; ++i) {
@ -48,7 +45,6 @@ namespace Utils {
return false;
}
};
}
#endif

View File

@ -28,11 +28,8 @@
#endif
namespace Utils {
class FileUtils {
private:
public:
static inline
namespace FileUtils {
inline
bool file_exists (char *filename)
{
#ifdef _WIN32
@ -47,7 +44,7 @@ namespace Utils {
#endif
}
static inline
inline
time_t last_modification (char *filename)
{
#ifdef _WIN32
@ -91,7 +88,7 @@ namespace Utils {
int size;
} file_body;
static inline
inline
file_body read_file (char *filename)
{
file_body file = {0};
@ -116,7 +113,6 @@ namespace Utils {
return file;
}
};
}
#endif

View File

@ -17,11 +17,8 @@
#include "ArraySort.h"
namespace Utils {
class StringUtils {
private:
public:
static inline
namespace StringUtils {
inline
bool is_number(const char *s)
{
while (*s != '\0') {
@ -41,7 +38,6 @@ namespace Utils {
int size;
} text_diff;
static
text_diff computeLCSDiff (char **from, int fromSize, char **to, int toSize)
{
char **diffValues = malloc(fromSize * toSize * sizeof(char *));
@ -140,7 +136,6 @@ namespace Utils {
return text_diff { diffValues, diffMasks, diffIndex };
}
};
}
#endif