Commit ac223035ca9deff48b8bb230b98b088eacbd9426

Add ColorTree constructor from std::array
Author: xaizek
Author date (UTC): 2021-12-29 00:25
Committer name: xaizek
Committer date (UTC): 2021-12-29 00:26
Parent(s): c1b59bb0f5ec9e3b482026a6693905b1f9b1c6ed
Signing key: 99DC5E4DB05F6BE2
Tree: ecc30fe20e756223deb85fc10b254b34571ceaa0
File Lines added Lines deleted
ColorTree.hpp 5 0
File ColorTree.hpp changed (mode: 100644) (index 2456b10..38502ed)
19 19 #ifndef LIBCURSED__COLORTREE_HPP__ #ifndef LIBCURSED__COLORTREE_HPP__
20 20 #define LIBCURSED__COLORTREE_HPP__ #define LIBCURSED__COLORTREE_HPP__
21 21
22 #include <array>
22 23 #include <functional> #include <functional>
23 24 #include <string> #include <string>
24 25 #include <vector> #include <vector>
 
... ... public:
144 145 template <std::size_t N> template <std::size_t N>
145 146 ColorTree(const wchar_t (&text)[N]) : text(text, text + N - 1) ColorTree(const wchar_t (&text)[N]) : text(text, text + N - 1)
146 147 { } { }
148 // Constructs a leaf node from text specified as `std::array<wchar_t, N>`.
149 template <std::size_t N>
150 ColorTree(const std::array<wchar_t, N> &text) : text(text.data())
151 { }
147 152 // Constructs a leaf node with specified text and format. // Constructs a leaf node with specified text and format.
148 153 ColorTree(std::wstring text, Format format); ColorTree(std::wstring text, Format format);
149 154
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/libcursed

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/libcursed

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master