tools

various tools
git clone git://deadbeef.fr/tools.git
Log | Files | Refs | README | LICENSE

commit 1a51df46e2abe4ebe3ffd5ae5a1cb0b559369e97
parent d25c6061a51eebdc7cad406c6d8811bf3cb7ae24
Author: Morel BĂ©renger <berengermorel76@gmail.com>
Date:   Sat,  2 Jan 2021 21:34:55 +0100

btl: updated setters to work with volatile cmd arg

Diffstat:
Mbtl/src/optparser.hpp | 20++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/btl/src/optparser.hpp b/btl/src/optparser.hpp @@ -142,9 +142,9 @@ void print_opts( FILE_PTR target, opt_desc_t const* start, opt_desc_t const* end // C "semi-static" strings in pointer template <typename T> -bool set( +bool set( typename std::enable_if <std::is_same<char const**,T>::value, void*>::type val, - char const* arg ) + char* arg ) { if( !val ) { @@ -157,9 +157,9 @@ bool set( // C strings in statically allocated buffer template <typename T, size_t SZ> -bool set( +bool set( typename std::enable_if <std::is_same<char*,T>::value, void*>::type val, - char const* arg ) + char* arg ) { if( !val ) { @@ -191,12 +191,12 @@ bool show( // signed integrals template <typename T> -bool set( +bool set( typename std::enable_if < std::is_integral<T>::value && std::is_signed<T>::value, void* - >::type val, char const* arg ) + >::type val, char* arg ) { if( !val ) { @@ -236,12 +236,12 @@ bool show( // unsigned integrals template <typename T> -bool set( +bool set( typename std::enable_if < std::is_integral<T>::value && std::is_unsigned<T>::value, void* - >::type val, char const* arg ) + >::type val, char* arg ) { if( !val ) { @@ -264,12 +264,12 @@ bool set( // floating numbers template <typename T> -bool set( +bool set( typename std::enable_if < std::is_floating_point<T>::value, void* - >::type val, char const* arg ) + >::type val, char* arg ) { if( !val ) {