9 Commits
v1.2 ... v1.3

Author SHA1 Message Date
Pranav
936043b7d4 Update block_progress_bar.hpp 2019-12-17 15:24:05 -06:00
Pranav
c90f375952 Update progress_spinner.hpp 2019-12-17 15:23:45 -06:00
Pranav
2241c00bb6 Update block_progress_bar.hpp 2019-12-17 15:23:26 -06:00
Pranav
bc128814fc Update progress_bar.hpp 2019-12-17 15:23:11 -06:00
Pranav
5a556bf5e2 Update README.md 2019-12-17 11:35:04 -06:00
Pranav
b5c2e78a72 Merge pull request #11 from offa/travis_ci
Travis CI
2019-12-17 11:31:07 -06:00
offa
4b2635020f Build status added. 2019-12-17 18:25:16 +01:00
offa
5751a58477 Travis CI supported added. 2019-12-17 18:25:16 +01:00
Pranav
a528d0d683 Update README.md 2019-12-17 10:05:44 -06:00
5 changed files with 74 additions and 3 deletions

65
.travis.yml Normal file
View File

@@ -0,0 +1,65 @@
language: generic
dist: bionic
matrix:
include:
- env: CXX=g++-9 CC=gcc-9
addons:
apt:
packages:
- g++-9
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
- env: CXX=g++-8 CC=gcc-8
addons:
apt:
packages:
- g++-8
- env: CXX=g++-7 CC=gcc-7
addons:
apt:
packages:
- g++-7
- env: CXX=g++-6 CC=gcc-6
addons:
apt:
packages:
- g++-6
- env: CXX=g++-5 CC=gcc-5
addons:
apt:
packages:
- g++-5
- env: CXX=clang++-9 CC=clang-9
addons:
apt:
packages:
- clang-9
- libc++-9-dev
- libc++abi-9-dev
sources:
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
- env: CXX=clang++-8 CC=clang-8
addons:
apt:
packages:
- clang-8
- libc++-8-dev
- libc++abi-8-dev
- env: CXX=clang++-7 CC=clang-7
addons:
apt:
packages:
- clang-7
- libc++-7-dev
- libc++abi-7-dev
script:
- if [[ "$CXX" == clang* ]]; then export CXXFLAGS="-stdlib=libc++"; fi
- mkdir build && cd build
- cmake -DDEMO=ON -DSAMPLES=ON ..
- make

View File

@@ -3,10 +3,13 @@
</p> </p>
<p align="center"> <p align="center">
<a href="https://travis-ci.com/p-ranav/indicators">
<img src="https://travis-ci.com/p-ranav/indicators.svg?branch=master" alt="ci status"/>
</a>
<a href="https://github.com/p-ranav/indicators/blob/master/LICENSE"> <a href="https://github.com/p-ranav/indicators/blob/master/LICENSE">
<img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="license"/> <img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="license"/>
</a> </a>
<img src="https://img.shields.io/badge/version-1.1-blue.svg?cacheSeconds=2592000" alt="version"/> <img src="https://img.shields.io/badge/version-1.2-blue.svg?cacheSeconds=2592000" alt="version"/>
</p> </p>
<p align="center"> <p align="center">
@@ -49,7 +52,7 @@ int main() {
Here's the general structure of a progress bar: Here's the general structure of a progress bar:
``` ```
{prefix} {start} {fill} {lead} {remaining} {end} {percentage} [{elapsed}<{remaining}?] {postfix} {prefix} {start} {fill} {lead} {remaining} {end} {percentage} [{elapsed}<{remaining}] {postfix}
^^^^^^^^^^^^^ Bar Width ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ Bar Width ^^^^^^^^^^^^^^^
``` ```

View File

@@ -25,6 +25,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
*/ */
#pragma once #pragma once
#define NOMINMAX
#include <algorithm> #include <algorithm>
#include <atomic> #include <atomic>
#include <chrono> #include <chrono>
@@ -201,7 +202,7 @@ private:
auto whole_width = std::floor(progress * _bar_width); auto whole_width = std::floor(progress * _bar_width);
auto remainder_width = fmod((progress * _bar_width), 1.0f); auto remainder_width = fmod((progress * _bar_width), 1.0f);
auto part_width = std::floor(remainder_width * lead_characters.size()); auto part_width = std::floor(remainder_width * lead_characters.size());
_lead = lead_characters[part_width]; _lead = lead_characters[size_t(part_width)];
if ((_bar_width - whole_width - 1) < 0) if ((_bar_width - whole_width - 1) < 0)
_lead = ""; _lead = "";
for (size_t i = 0; i < whole_width; ++i) for (size_t i = 0; i < whole_width; ++i)

View File

@@ -25,6 +25,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
*/ */
#pragma once #pragma once
#define NOMINMAX
#include <algorithm> #include <algorithm>
#include <atomic> #include <atomic>
#include <chrono> #include <chrono>

View File

@@ -25,6 +25,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.
*/ */
#pragma once #pragma once
#define NOMINMAX
#include <algorithm> #include <algorithm>
#include <atomic> #include <atomic>
#include <chrono> #include <chrono>