mirror of
https://github.com/Karaka-Management/cOMS.git
synced 2026-02-02 12:38:40 +00:00
fix linting
This commit is contained in:
parent
b0d10c5eaa
commit
a82e0383cb
|
|
@ -17,8 +17,10 @@
|
|||
#include "../DatabaseType.h"
|
||||
#include "../DatabaseStatus.h"
|
||||
|
||||
namespace DataStorage {
|
||||
namespace Database {
|
||||
namespace DataStorage
|
||||
{
|
||||
namespace Database
|
||||
{
|
||||
struct ConnectionAbstract {
|
||||
void* con = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,10 @@
|
|||
#include "PostgresqlConnection.h"
|
||||
#include "SQLiteConnection.h"
|
||||
|
||||
namespace DataStorage {
|
||||
namespace Database {
|
||||
namespace DataStorage
|
||||
{
|
||||
namespace Database
|
||||
{
|
||||
ConnectionAbstract *create_connection(DbConnectionConfig dbdata)
|
||||
{
|
||||
switch (dbdata.db) {
|
||||
|
|
|
|||
|
|
@ -15,8 +15,10 @@
|
|||
|
||||
#include "../DatabaseType.h"
|
||||
|
||||
namespace DataStorage {
|
||||
namespace Database {
|
||||
namespace DataStorage
|
||||
{
|
||||
namespace Database
|
||||
{
|
||||
typedef struct {
|
||||
DatabaseType db = DatabaseType::UNDEFINED;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,8 +20,10 @@
|
|||
#include "../DatabaseType.h"
|
||||
#include "../DatabaseStatus.h"
|
||||
|
||||
namespace DataStorage {
|
||||
namespace Database {
|
||||
namespace DataStorage
|
||||
{
|
||||
namespace Database
|
||||
{
|
||||
struct MysqlConnection : ConnectionAbstract {
|
||||
MysqlConnection(DbConnectionConfig dbdata)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,8 +20,10 @@
|
|||
#include "../DatabaseType.h"
|
||||
#include "../DatabaseStatus.h"
|
||||
|
||||
namespace DataStorage {
|
||||
namespace Database {
|
||||
namespace DataStorage
|
||||
{
|
||||
namespace Database
|
||||
{
|
||||
struct PostgresqlConnection : ConnectionAbstract {
|
||||
PostgresqlConnection(DbConnectionConfig dbdata)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,8 +20,10 @@
|
|||
#include "../DatabaseType.h"
|
||||
#include "../DatabaseStatus.h"
|
||||
|
||||
namespace DataStorage {
|
||||
namespace Database {
|
||||
namespace DataStorage
|
||||
{
|
||||
namespace Database
|
||||
{
|
||||
struct SQLiteConnection : ConnectionAbstract {
|
||||
SQLiteConnection(DbConnectionConfig dbdata)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,8 +10,10 @@
|
|||
#ifndef DATASTORAGE_DATABASE_STATUS_H
|
||||
#define DATASTORAGE_DATABASE_STATUS_H
|
||||
|
||||
namespace DataStorage {
|
||||
namespace Database {
|
||||
namespace DataStorage
|
||||
{
|
||||
namespace Database
|
||||
{
|
||||
typedef enum {
|
||||
OK = 0,
|
||||
MISSING_DATABASE = 1,
|
||||
|
|
|
|||
|
|
@ -12,8 +12,10 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
namespace DataStorage {
|
||||
namespace Database {
|
||||
namespace DataStorage
|
||||
{
|
||||
namespace Database
|
||||
{
|
||||
typedef enum {
|
||||
MYSQL = 1,
|
||||
SQLITE = 2,
|
||||
|
|
|
|||
|
|
@ -13,8 +13,10 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace DataStorage {
|
||||
namespace Database {
|
||||
namespace DataStorage
|
||||
{
|
||||
namespace Database
|
||||
{
|
||||
typedef struct {
|
||||
char *name;
|
||||
char *type;
|
||||
|
|
|
|||
|
|
@ -15,8 +15,10 @@
|
|||
|
||||
#include "DbField.h"
|
||||
|
||||
namespace DataStorage {
|
||||
namespace Database {
|
||||
namespace DataStorage
|
||||
{
|
||||
namespace Database
|
||||
{
|
||||
typedef struct {
|
||||
char *name;
|
||||
DbField *fields;
|
||||
|
|
|
|||
|
|
@ -199,8 +199,10 @@
|
|||
pxor(r2, r3)
|
||||
#endif
|
||||
|
||||
namespace Hash {
|
||||
namespace Meow {
|
||||
namespace Hash
|
||||
{
|
||||
namespace Meow
|
||||
{
|
||||
#if MEOW_DUMP
|
||||
struct meow_dump
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14,8 +14,10 @@
|
|||
#include <opencv2/opencv.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace Image {
|
||||
namespace BillDetection {
|
||||
namespace Image
|
||||
{
|
||||
namespace BillDetection
|
||||
{
|
||||
cv::Mat highlightBill(cv::Mat in)
|
||||
{
|
||||
cv::Mat gray;
|
||||
|
|
|
|||
|
|
@ -15,8 +15,10 @@
|
|||
|
||||
#include "../Utils/MathUtils.h"
|
||||
|
||||
namespace Image {
|
||||
namespace ImageUtils {
|
||||
namespace Image
|
||||
{
|
||||
namespace ImageUtils
|
||||
{
|
||||
cv::Mat find_diff (cv::Mat in1, cv::Mat in2)
|
||||
{
|
||||
cv::Mat diff;
|
||||
|
|
|
|||
|
|
@ -13,8 +13,10 @@
|
|||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
namespace Image {
|
||||
namespace ImageUtils {
|
||||
namespace Image
|
||||
{
|
||||
namespace ImageUtils
|
||||
{
|
||||
inline
|
||||
float lightnessFromRgb(int r, int g, int b)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@
|
|||
#include "ImageUtils.h"
|
||||
#include "../Utils/MathUtils.h"
|
||||
|
||||
namespace Image {
|
||||
namespace Image
|
||||
{
|
||||
const float KERNEL_RIDGE_1[3][3] = {
|
||||
{0.0, -1.0, 0.0},
|
||||
{-1.0, 4.0, -1.0},
|
||||
|
|
@ -61,7 +62,8 @@ namespace Image {
|
|||
{-1.0 / 256.0, -4.0 / 256.0, -6.0 / 256.0, -4.0 / 256.0, -1.0 / 256.0},
|
||||
};
|
||||
|
||||
namespace Kernel {
|
||||
namespace Kernel
|
||||
{
|
||||
inline
|
||||
cv::Mat convolve(cv::Mat in, const float kernel[][3])
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,8 +16,10 @@
|
|||
|
||||
#include "../Utils/MathUtils.h"
|
||||
|
||||
namespace Image {
|
||||
namespace Skew {
|
||||
namespace Image
|
||||
{
|
||||
namespace Skew
|
||||
{
|
||||
cv::Mat deskewHoughLines(cv::Mat in, int maxDegree = 45)
|
||||
{
|
||||
cv::Size dim = in.size();
|
||||
|
|
|
|||
|
|
@ -16,8 +16,10 @@
|
|||
#include "ImageUtils.h"
|
||||
#include "../Utils/MathUtils.h"
|
||||
|
||||
namespace Image {
|
||||
namespace Thresholding {
|
||||
namespace Image
|
||||
{
|
||||
namespace Thresholding
|
||||
{
|
||||
cv::Mat integralThresholding(cv::Mat in)
|
||||
{
|
||||
cv::Size dim = in.size();
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@
|
|||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
namespace Threads {
|
||||
namespace Threads
|
||||
{
|
||||
#ifdef _WIN32
|
||||
typedef DWORD WINAPI(*JobFunc)(void *);
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@
|
|||
#include "Job.h"
|
||||
#include "ThreadPool.h"
|
||||
|
||||
namespace Threads {
|
||||
namespace Threads
|
||||
{
|
||||
Job *pool_work_create(JobFunc func, void *arg)
|
||||
{
|
||||
Job *work;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,8 @@
|
|||
#include "OSWrapper.h"
|
||||
#include "Job.h"
|
||||
|
||||
namespace Threads {
|
||||
namespace Threads
|
||||
{
|
||||
typedef struct {
|
||||
Job *work_first;
|
||||
Job *work_last;
|
||||
|
|
|
|||
|
|
@ -16,8 +16,10 @@
|
|||
|
||||
#include "OSWrapper.h"
|
||||
|
||||
namespace Utils {
|
||||
namespace ApplicationUtils {
|
||||
namespace Utils
|
||||
{
|
||||
namespace ApplicationUtils
|
||||
{
|
||||
inline
|
||||
char *cwd()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,8 +16,10 @@
|
|||
|
||||
#include "StringUtils.h"
|
||||
|
||||
namespace Utils {
|
||||
namespace ArrayUtils {
|
||||
namespace Utils
|
||||
{
|
||||
namespace ArrayUtils
|
||||
{
|
||||
inline
|
||||
char* get_arg(const char *id, char **argv, int length)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -23,8 +23,10 @@
|
|||
|
||||
#include "OSWrapper.h"
|
||||
|
||||
namespace Utils {
|
||||
namespace FileUtils {
|
||||
namespace Utils
|
||||
{
|
||||
namespace FileUtils
|
||||
{
|
||||
inline
|
||||
bool file_exists (const char *filename)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2793,7 +2793,8 @@ JSON_HEDLEY_DIAGNOSTIC_POP
|
|||
// it allows using the detected idiom to retrieve the return type
|
||||
// of such an expression
|
||||
#define NLOHMANN_CAN_CALL_STD_FUNC_IMPL(std_name) \
|
||||
namespace detail { \
|
||||
namespace detail
|
||||
{ \
|
||||
using std::std_name; \
|
||||
\
|
||||
template<typename... T> \
|
||||
|
|
|
|||
|
|
@ -14,9 +14,12 @@
|
|||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
namespace Utils {
|
||||
namespace Rng {
|
||||
namespace StringUtils {
|
||||
namespace Utils
|
||||
{
|
||||
namespace Rng
|
||||
{
|
||||
namespace StringUtils
|
||||
{
|
||||
inline
|
||||
char* generate_string(
|
||||
size_t min = 10, size_t max = 10,
|
||||
|
|
|
|||
|
|
@ -17,8 +17,10 @@
|
|||
#include "MathUtils.h"
|
||||
#include "ArraySort.h"
|
||||
|
||||
namespace Utils {
|
||||
namespace StringUtils {
|
||||
namespace Utils
|
||||
{
|
||||
namespace StringUtils
|
||||
{
|
||||
inline
|
||||
char *search_replace(const char *haystack, const char *needle, const char *replace)
|
||||
{
|
||||
|
|
@ -251,7 +253,7 @@ namespace Utils {
|
|||
}
|
||||
diffValues = diffValuesT;
|
||||
|
||||
int *diffMasksT = (int *) realloc(diffMasks, diffIndex * sizeof(int));
|
||||
int *diffMasksT = (int *) realloc(diffMasks, diffIndex * sizeof(int));
|
||||
if (!diffMasksT) {
|
||||
free(diffMasks);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,8 +17,10 @@
|
|||
|
||||
#include "FileUtils.h"
|
||||
|
||||
namespace Utils {
|
||||
namespace WebUtils {
|
||||
namespace Utils
|
||||
{
|
||||
namespace WebUtils
|
||||
{
|
||||
static bool CURL_SETUP = false;
|
||||
|
||||
inline
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user