Skip to content

Instantly share code, notes, and snippets.

View ChemistAion's full-sized avatar
🙃

rtj ChemistAion

🙃
View GitHub Profile
@ChemistAion
ChemistAion / custom_type_test.cc
Created March 26, 2019 16:39
cista playground on target_use_serialized_size branch with custom type
#include "doctest.h"
#include <cinttypes>
#include <memory>
#include <vector>
#include "cista.h"
using namespace cista;
using namespace cista::raw;
@ChemistAion
ChemistAion / TypeRefDecay.hpp
Created March 19, 2019 20:24
Type Reference Decay tests...
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
struct TestStructure
{
int number = 42;
};
////////////////////////////////////////////////////////////////////////////////
@ChemistAion
ChemistAion / arity.hpp
Created March 18, 2019 19:54
Aggregate arity calculations, based on: Björn Fahller and Anatoliy V. Tomilov implementations
// https://playfulprogramming.blogspot.com/2016/12/serializing-structs-with-c17-structured.html
// https://codereview.stackexchange.com/questions/142804/get-n-th-data-member-of-a-struct
// https://stackoverflow.com/questions/39768517/structured-bindings-width
// https://stackoverflow.com/questions/35463646/arity-of-aggregate-in-logarithmic-time
// https://stackoverflow.com/questions/38393302/returning-variadic-aggregates-struct-and-syntax-for-c17-variadic-template-c
#pragma once
#include <type_traits>
@ChemistAion
ChemistAion / nodes.cpp
Last active January 12, 2024 20:37
Second prototype of standalone node graph editor for ImGui
#include "nodes.h"
namespace ImGui
{
void ImGuiNodes::UpdateCanvasGeometry(ImDrawList* draw_list)
{
const ImGuiIO& io = ImGui::GetIO();
mouse_ = ImGui::GetMousePos();
@ChemistAion
ChemistAion / ImwConfig.h
Created February 1, 2018 12:09
Customized ImWindow (https://github.com/thennequin/ImWindow) with latest ImGui support
#pragma once
#include <stdlib.h>
#ifndef ImwList
#include <list>
#define ImwList std::list
#endif // ImwList
#ifndef ImwMap
@ChemistAion
ChemistAion / Nodes.cpp
Created January 25, 2018 15:02
Prototype of standalone node graph editor for ImGui
// Prototype of standalone node graph editor for ImGui
// Thread: https://github.com/ocornut/imgui/issues/306
//
// This is based on code by:
// @emoon https://gist.github.com/emoon/b8ff4b4ce4f1b43e79f2
// @ocornut https://gist.github.com/ocornut/7e9b3ec566a333d725d4
// @flix01 https://github.com/Flix01/imgui/blob/b248df2df98af13d4b7dbb70c92430afc47a038a/addons/imguinodegrapheditor/imguinodegrapheditor.cpp#L432
#include "Nodes.h"