| Directory: | src/ |
|---|---|
| File: | src/Base.cpp |
| Date: | 2026-09-03 17:04:53 |
| Exec | Total | Coverage | |
|---|---|---|---|
| Lines: | 8 | 8 | 100.0% |
| Branches: | 9 | 16 | 56.2% |
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /***************************************************************************** | ||
| 2 | * | ||
| 3 | * Copyright (C) 2021 Jonathan Grahl <jonathan.grahl@igh.de> | ||
| 4 | * 2021 Florian Pose <florian.pose@igh.de> | ||
| 5 | * | ||
| 6 | * This file is part of the reta library (realtime-automation). | ||
| 7 | * | ||
| 8 | * The reta library is free software: you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU Lesser General Public License as published | ||
| 10 | * by the Free Software Foundation, either version 3 of the License, or (at | ||
| 11 | * your option) any later version. | ||
| 12 | * | ||
| 13 | * The reta library is distributed in the hope that it will be useful, but | ||
| 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser | ||
| 16 | * General Public License for more details. | ||
| 17 | * | ||
| 18 | * You should have received a copy of the GNU Lesser General Public License | ||
| 19 | * along with the reta library. If not, see <http://www.gnu.org/licenses/>. | ||
| 20 | * | ||
| 21 | ****************************************************************************/ | ||
| 22 | |||
| 23 | #include "Base.h" | ||
| 24 | |||
| 25 | #include <sstream> | ||
| 26 | using namespace Reta; | ||
| 27 | using namespace std; | ||
| 28 | |||
| 29 | /****************************************************************************/ | ||
| 30 | |||
| 31 | 314 | Base::Base(const string &path) : path {path} | |
| 32 | 314 | {} | |
| 33 | |||
| 34 | /****************************************************************************/ | ||
| 35 | |||
| 36 | 313 | void Base::checkZeroWidth(unsigned int width) const | |
| 37 | { | ||
| 38 |
2/2✓ Branch 0 taken 308 times.
✓ Branch 1 taken 5 times.
|
313 | if (width) { |
| 39 | 616 | return; | |
| 40 | } | ||
| 41 | |||
| 42 |
1/2✓ Branch 2 taken 5 times.
✗ Branch 3 not taken.
|
10 | stringstream str; |
| 43 | str << __PRETTY_FUNCTION__ << " : " << path | ||
| 44 |
4/8✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 5 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 5 times.
✗ Branch 8 not taken.
✓ Branch 10 taken 5 times.
✗ Branch 11 not taken.
|
5 | << " Zero width is not allowed!"; |
| 45 |
2/4✓ Branch 2 taken 5 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 5 times.
✗ Branch 6 not taken.
|
5 | throw invalid_argument(str.str()); |
| 46 | } | ||
| 47 | |||
| 48 | /****************************************************************************/ | ||
| 49 |