fix: keep overlapping periods
This commit is contained in:
		
							parent
							
								
									be84c0e4c2
								
							
						
					
					
						commit
						3aa0c514a5
					
				
					 1 changed files with 0 additions and 13 deletions
				
			
		| 
						 | 
					@ -60,19 +60,6 @@ helpers::parse_periods(Json::Value periods_json)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            continue;
 | 
					            continue;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        bool period_overlap = false;
 | 
					 | 
				
			||||||
        for(int j = 0; j < result->length; j++)
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            if(result->periods[j]->is_in_period(start) || result->periods[j]->is_in_period(end))
 | 
					 | 
				
			||||||
            {
 | 
					 | 
				
			||||||
                period_overlap = true;
 | 
					 | 
				
			||||||
                break;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        if(period_overlap)
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            continue;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        result->add_period(start, end);
 | 
					        result->add_period(start, end);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue