Open giveitatry168 opened 4 years ago
In websocket.h, should line 394 a fall-through or a break?
382 switch(opcode()) 383 { 384 case 0: // Continuation 385 { 386 message += fragment; 387 if (is_FIN()) 388 { 389 if (messagehandler) 390 messagehandler(this, message_, isbinary); 391 message_.clear(); 392 } 393 } 394 break; <<<< fall through or break? 395 case 1: // Text 396 { 397 isbinary = false; 398 message += fragment; 399 if (is_FIN()) 400 { 401 if (messagehandler) 402 messagehandler(this, message_, isbinary); 403 message_.clear(); 404 } 405 } 406 break;
I believe fallthrough was introduced in C++ 17, this library from what I found uses C++ 11 or 14 if available, so I'm guessing it should be break;.
break;
In websocket.h, should line 394 a fall-through or a break?
382 switch(opcode()) 383 { 384 case 0: // Continuation 385 { 386 message += fragment; 387 if (is_FIN()) 388 { 389 if (messagehandler) 390 messagehandler(this, message_, isbinary); 391 message_.clear(); 392 } 393 } 394 break; <<<< fall through or break? 395 case 1: // Text 396 { 397 isbinary = false; 398 message += fragment; 399 if (is_FIN()) 400 { 401 if (messagehandler) 402 messagehandler(this, message_, isbinary); 403 message_.clear(); 404 } 405 } 406 break;