mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-26 20:38:45 +08:00
Make string optimization (#179)
* Add NO_STL std::reverse implementation (#174) Follows the example implementation on [1]. [1] https://en.cppreference.com/w/cpp/algorithm/reverse * Merge remote-tracking branch 'origin/feature/no_stl_unit_tests' into development # Conflicts: # include/etl/stl/alternate/algorithm.h # include/etl/stl/alternate/iterator.h # include/etl/version.h # library.json # library.properties # support/Release notes.txt # test/test_no_stl_algorithm.cpp # test/test_no_stl_iterator.cpp # test/vs2017/etl.vcxproj * Fix merge function duplication * Merge remote-tracking branch 'origin/development' # Conflicts: # include/etl/private/choose_pair_types.h # include/etl/private/choose_tag_types.h # include/etl/version.h # library.json # library.properties # support/Release notes.txt * Update README.md * make_string optimisation. String length is calculated in compile time, no need to use strlen.
This commit is contained in:
parent
2dd2d295c8
commit
4a6737b0fa
26
.circleci/config.yml
Normal file
26
.circleci/config.yml
Normal file
@ -0,0 +1,26 @@
|
||||
version: 2
|
||||
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: "debian:stretch"
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Installing SUDO
|
||||
command: 'apt-get update && apt-get install -y sudo && rm -rf /var/lib/apt/lists/*'
|
||||
- run:
|
||||
name: Installing GCC
|
||||
command: 'apt-get update && apt-get install -y gcc g++'
|
||||
- run:
|
||||
name: Install CMAKE
|
||||
command: 'apt-get update && sudo apt-get install -y cmake'
|
||||
- run:
|
||||
name: Creating Build Files
|
||||
command: 'cmake -H. -Bbuild'
|
||||
- run:
|
||||
name: Creating Binary Files
|
||||
command: 'cmake --build build'
|
||||
- run:
|
||||
name: ETL Unit Testing
|
||||
command: './bin/etl'
|
||||
23
appveyor.yml
Normal file
23
appveyor.yml
Normal file
@ -0,0 +1,23 @@
|
||||
version: 1.0.{build}
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
image: Visual Studio 2017
|
||||
configuration:
|
||||
- Debug
|
||||
- DebugNoSTL
|
||||
clone_folder: c:\projects\etl
|
||||
install:
|
||||
- cmd: git submodule update --init --recursive
|
||||
before_build:
|
||||
- cmd: git clone https://github.com/unittest-cpp/unittest-cpp.git c:\projects\unittest-cpp
|
||||
build:
|
||||
project: test/vs2017/etl.vcxproj
|
||||
verbosity: minimal
|
||||
notifications:
|
||||
- provider: Webhook
|
||||
url: https://hooks.slack.com/services/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
|
||||
method: POST
|
||||
on_build_success: true
|
||||
on_build_failure: true
|
||||
on_build_status_changed: true
|
||||
@ -258,7 +258,7 @@ namespace etl
|
||||
template<const size_t MAX_SIZE>
|
||||
etl::string<MAX_SIZE - 1> make_string(const char (&text) [MAX_SIZE])
|
||||
{
|
||||
return etl::string<MAX_SIZE - 1>(text);
|
||||
return etl::string<MAX_SIZE - 1>(text, MAX_SIZE - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -258,7 +258,7 @@ namespace etl
|
||||
template<const size_t MAX_SIZE>
|
||||
etl::u16string<MAX_SIZE - 1> make_string(const char16_t (&text) [MAX_SIZE])
|
||||
{
|
||||
return etl::u16string<MAX_SIZE - 1>(text);
|
||||
return etl::u16string<MAX_SIZE - 1>(text, MAX_SIZE - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -258,7 +258,7 @@ namespace etl
|
||||
template<const size_t MAX_SIZE>
|
||||
etl::u32string<MAX_SIZE - 1> make_string(const char32_t (&text) [MAX_SIZE])
|
||||
{
|
||||
return etl::u32string<MAX_SIZE - 1>(text);
|
||||
return etl::u32string<MAX_SIZE - 1>(text, MAX_SIZE - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -259,7 +259,7 @@ namespace etl
|
||||
template<const size_t MAX_SIZE>
|
||||
etl::wstring<MAX_SIZE - 1> make_string(const wchar_t (&text) [MAX_SIZE])
|
||||
{
|
||||
return etl::wstring<MAX_SIZE - 1>(text);
|
||||
return etl::wstring<MAX_SIZE - 1>(text, MAX_SIZE - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user