aboutsummaryrefslogtreecommitdiff
path: root/src/time.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/time.cpp')
-rwxr-xr-xsrc/time.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/time.cpp b/src/time.cpp
index 8fd8931..ee8f139 100755
--- a/src/time.cpp
+++ b/src/time.cpp
@@ -177,10 +177,8 @@ workday::workday(const moment& previous_wrap,
// TODO: Implement a good system for this fuckin' paragraph:
// A. 50 % tillegg for arbeid inntil 2 timer før, eller inntil 3 timer etter ordinær arbeidstid når arbeidstiden ikke er forskjøvet og overtiden er varslet. Dersom det varsles overtid både før og etter ordinær arbeidstid betales de to første timene med 50 % tillegg og de øvrige med 100 % tillegg.
- for(timeblock& each_block : blocks){ // C++11 stuff right here.
- // FIXME: I think this is the source of the crash and infinite loop, because it reaches garbage data.
- // Limit it to total_timeblocks!
- // When it doesn't crash, it is because all the garbage moments are: 00:00 0-00-00
+ for(int ii=0; ii < total_timeblocks; ii++){
+ timeblock& each_block = blocks[ii];
std::cout << "pricing: " << timeprint(each_block) << std::endl;
if(each_block.hourcount() == 8) {
each_block.valuefactor = 7.5/8.0;