Skip to content

Instantly share code, notes, and snippets.

View Hexlord's full-sized avatar

Alexander Knorre Hexlord

View GitHub Profile
<code_scheme name="Project" version="173">
<Objective-C>
<option name="INDENT_NAMESPACE_MEMBERS" value="0" />
<option name="FUNCTION_PARAMETERS_WRAP" value="5" />
<option name="FUNCTION_CALL_ARGUMENTS_WRAP" value="5" />
<option name="SHIFT_OPERATION_WRAP" value="5" />
<option name="TEMPLATE_PARAMETERS_WRAP" value="5" />
<option name="TEMPLATE_CALL_ARGUMENTS_WRAP" value="5" />
<option name="CLASS_CONSTRUCTOR_INIT_LIST_NEW_LINE_BEFORE_COLON" value="0" />
<option name="CLASS_CONSTRUCTOR_INIT_LIST_NEW_LINE_AFTER_COLON" value="1" />
#include <threads.h>
namespace SE {
static
ecs_os_thread_t stdcpp_thread_new(
ecs_os_thread_callback_t callback,
void *arg)
{
#pragma once
template<typename T>
struct TPoint {
T X;
T Y;
};
template<typename T>
bool operator==(const TPoint<T> &Point, const TPoint<T> &Other) {
#pragma once
#include <Array/UtilityArray.h>
namespace SE {
struct HHandle {
uint32 UnorderedIndex;
uint32 Generation;
};
#pragma once
#include <Allocator/Allocator.h>
namespace SE {
template<typename T>
class TArrayConstIterator {
public:
@Hexlord
Hexlord / Collection.h
Created January 10, 2021 11:35
Collection for creation of elements with persistent handle identification through unordered set
#pragma once
#include <Array/Array.h>
namespace SE {
struct FHandle {
uint32 UnorderedIndex;
uint32 Generation;
};
@Hexlord
Hexlord / HandleStorage.h
Created December 26, 2020 02:45
Showcase of my handle storage container
#pragma once
#include "Utility/Debug.h"
#include "Handle.h"
template <
typename KeyType,
typename ValueType,
uint16 InitialSize>
class THandleStorage
// MIT License
// Copyright (c) 2019 Erin Catto
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@Hexlord
Hexlord / CMake notes for MSVS libclang AST parsing
Last active May 16, 2020 19:14
CMake notes regarding how to parse AST of your project via libclang if you use CMake MSVS toolchain with lots of dependencies
// One would want to fetch all include directories from all the targets your main executable is linked against (and executable itself)
// Then you need to provide WinSDK include paths (the ones MSVS uses)
// Finally feed them in format of -I<argN> args in function clang_parseTranslationUnit in your LIBCLANG_APP
// Important part of my CMakeLists.txt is provided below
// Find script is available here https://github.com/rpavlik/cmake-modules/blob/master/FindWindowsSDK.cmake
// Example of your LinkedTargets: it is identical to linking!
target_link_libraries (MainExecutable SDL2-static freetype icuuc cAudio sfmt OpenAL)
set(LinkedTargets MainExecutable SDL2-static freetype icuuc cAudio sfmt OpenAL)
@Hexlord
Hexlord / git_bash_here.ahk
Last active November 5, 2019 07:38 — forked from yiboyang/git_bash_here.ahk
Git bash here in Windows Explorer with Ctrl + Alt + T
;
; AutoHotkey Version: 1.1
; Language: English
; Platform: Win9x/NT
; Author: Yibo
;
; Script Function:
; Define the shortcut Ctrl + Alt + T for launching Git bash in current folder in Windows Explorer
;