mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdChart: Config defaults make the rules defaults redundant
- Do not need both
This commit is contained in:
parent
42ba7ac92c
commit
addb89e13d
1 changed files with 5 additions and 5 deletions
|
@ -157,7 +157,7 @@ int renderChart (
|
||||||
(rules.getBoolean ("reports." + type + ".day") ? 3 : 0) +
|
(rules.getBoolean ("reports." + type + ".day") ? 3 : 0) +
|
||||||
(rules.getBoolean ("reports." + type + ".weekday") ? 4 : 0);
|
(rules.getBoolean ("reports." + type + ".weekday") ? 4 : 0);
|
||||||
|
|
||||||
auto cell = rules.getInteger ("reports." + type + ".cell", 15);
|
auto cell = rules.getInteger ("reports." + type + ".cell");
|
||||||
if (cell < 1)
|
if (cell < 1)
|
||||||
throw format ("The value for 'reports.{1}.cell' must be at least 1.", type);
|
throw format ("The value for 'reports.{1}.cell' must be at least 1.", type);
|
||||||
|
|
||||||
|
@ -297,7 +297,7 @@ static void renderAxis (
|
||||||
int first_hour,
|
int first_hour,
|
||||||
int last_hour)
|
int last_hour)
|
||||||
{
|
{
|
||||||
auto cell = rules.getInteger ("reports." + type + ".cell", 15);
|
auto cell = rules.getInteger ("reports." + type + ".cell");
|
||||||
if (cell < 1)
|
if (cell < 1)
|
||||||
throw format ("The value for 'reports.{1}.cell' must be at least 1.", type);
|
throw format ("The value for 'reports.{1}.cell' must be at least 1.", type);
|
||||||
|
|
||||||
|
@ -416,7 +416,7 @@ static std::string renderSubTotal (
|
||||||
(rules.getBoolean ("reports." + type + ".weekday") ? 4 : 0);
|
(rules.getBoolean ("reports." + type + ".weekday") ? 4 : 0);
|
||||||
int spacing = rules.getInteger ("reports." + type + ".spacing");
|
int spacing = rules.getInteger ("reports." + type + ".spacing");
|
||||||
|
|
||||||
auto cell = rules.getInteger ("reports." + type + ".cell", 15);
|
auto cell = rules.getInteger ("reports." + type + ".cell");
|
||||||
if (cell < 1)
|
if (cell < 1)
|
||||||
throw format ("The value for 'reports.{1}.cell' must be at least 1.", type);
|
throw format ("The value for 'reports.{1}.cell' must be at least 1.", type);
|
||||||
|
|
||||||
|
@ -451,7 +451,7 @@ static void renderExclusionBlocks (
|
||||||
int last_hour,
|
int last_hour,
|
||||||
const std::vector <Range>& excluded)
|
const std::vector <Range>& excluded)
|
||||||
{
|
{
|
||||||
auto cell = rules.getInteger ("reports." + type + ".cell", 15);
|
auto cell = rules.getInteger ("reports." + type + ".cell");
|
||||||
if (cell < 1)
|
if (cell < 1)
|
||||||
throw format ("The value for 'reports.{1}.cell' must be at least 1.", type);
|
throw format ("The value for 'reports.{1}.cell' must be at least 1.", type);
|
||||||
|
|
||||||
|
@ -517,7 +517,7 @@ static void renderInterval (
|
||||||
bool ids)
|
bool ids)
|
||||||
{
|
{
|
||||||
Datetime now;
|
Datetime now;
|
||||||
auto cell = rules.getInteger ("reports." + type + ".cell", 15);
|
auto cell = rules.getInteger ("reports." + type + ".cell");
|
||||||
if (cell < 1)
|
if (cell < 1)
|
||||||
throw format ("The value for 'reports.{1}.cell' must be at least 1.", type);
|
throw format ("The value for 'reports.{1}.cell' must be at least 1.", type);
|
||||||
auto spacing = rules.getInteger ("reports." + type + ".spacing");
|
auto spacing = rules.getInteger ("reports." + type + ".spacing");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue