{
"workbench.colorCustomizations": {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "date" | |
require "fileutils" | |
require "json" | |
# Make a commit. | |
# We need the portfiles to refer to an actual commit. | |
# It will only commit if anything changed, tho. | |
system "git add ." | |
system %{git commit -m "Auto commit (content changed) #{DateTime.now.strftime "%d/%m/%Y %H:%M:%S"}"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: this parser | |
# Here is the helper macro to use in your project: | |
macro(parse_arguments) | |
cmake_parse_arguments(__argument_parser "" "PREFIX" "FLAG;VALUE;MULTI;ARGS" ${ARGN}) | |
if(NOT DEFINED __argument_parser_PREFIX) | |
set(__argument_parser_PREFIX "${CMAKE_CURRENT_FUNCTION}") | |
endif() | |
cmake_parse_arguments("${__argument_parser_PREFIX}" "${__argument_parser_FLAG}" "${__argument_parser_VALUE}" "${__argument_parser_MULTI}" ${__argument_parser_ARGS}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(\[[^\]]*\])\s*(\[[^\]]*\])\s*(\[[^\]]*\])\s*(\[[^\]]*\])\s*(.*) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CMake function which adds a target to check every that header in your project has all required #include's | |
function(check_header_includes) | |
set(options) | |
set(oneValueArgs TARGET INCLUDE_DIR TEMP_DIR) | |
set(multiValueArgs HEADERS PACKAGES LIBRARY_PATHS LIBRARIES) | |
cmake_parse_arguments(CHECK_HEADER_INCLUDES "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) | |
if(NOT CMAKE_OBJECT_PATH_MAX OR CMAKE_OBJECT_PATH_MAX LESS 1000) | |
# Bump up the max object path or CMake can get angry with some generated paths | |
# https://stackoverflow.com/questions/68351713/maximum-path-lengths-with-cmake |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Singleton Methods": { | |
"prefix": "singleton", | |
"body": [ | |
"$1() = default;\n~$1() = default;\n$1(const $1&) = delete;\n$1($1&&) = delete;\n$1& operator=(const $1&) = delete;\n$1& operator=($1&&) = delete;\nstatic $1& GetSingleton() {\n static $1 singleton;\n return singleton;\n}" | |
], | |
"description": "Methods for singleton constructor/descructors incl operators" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
AccessModifierOffset: -4 | |
BasedOnStyle: Google | |
ColumnLimit: 180 | |
IndentWidth: '4' | |
NamespaceIndentation: All | |
TabWidth: '4' | |
UseTab: Always | |
IndentPPDirectives: BeforeHash | |
FixNamespaceComments: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": 2, | |
"cmakeMinimumRequired": { "major": 3, "minor": 21, "patch": 0 }, | |
"configurePresets": [ | |
{ | |
"name": "flags", | |
"hidden": true, | |
"cacheVariables": { | |
"CMAKE_CXX_FLAGS": "/permissive- /Zc:preprocessor /EHsc /MP /W4 -DWIN32_LEAN_AND_MEAN -DNOMINMAX -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_WARNINGS" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <class... Types> | |
void Log(const std::string text, const Types&... args) { | |
std::string result = std::format(text, args...); | |
// logger::info("{}", result); | |
// RE::ConsoleLog::GetSingleton()->Print(std::format("[SkyrimScripting] {}", result).c_str()); | |
// std::cout << result << std::endl; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <gtest/gtest.h> | |
#include <gmock/gmock.h> | |
using ::testing::_; | |
using ::testing::AtLeast; // #1 | |
using ::testing::Ge; | |
using ::testing::NotNull; | |
using ::testing::StrictMock; |