🚨 fixed another linter warning
This commit is contained in:
		
							parent
							
								
									ec95438a59
								
							
						
					
					
						commit
						fa722d5ac3
					
				
					 2 changed files with 10 additions and 4 deletions
				
			
		|  | @ -392,17 +392,20 @@ class binary_reader | |||
| 
 | ||||
|             case 0xF9: // Half-Precision Float (two-byte IEEE 754)
 | ||||
|             { | ||||
|                 const int byte1 = get(); | ||||
|                 const int byte1_raw = get(); | ||||
|                 if (JSON_UNLIKELY(not unexpect_eof())) | ||||
|                 { | ||||
|                     return false; | ||||
|                 } | ||||
|                 const int byte2 = get(); | ||||
|                 const int byte2_raw = get(); | ||||
|                 if (JSON_UNLIKELY(not unexpect_eof())) | ||||
|                 { | ||||
|                     return false; | ||||
|                 } | ||||
| 
 | ||||
|                 const unsigned char byte1 = static_cast<unsigned char>(byte1_raw); | ||||
|                 const unsigned char byte2 = static_cast<unsigned char>(byte2_raw); | ||||
| 
 | ||||
|                 // code from RFC 7049, Appendix D, Figure 3:
 | ||||
|                 // As half-precision floating-point numbers were only added
 | ||||
|                 // to IEEE 754 in 2008, today's programming platforms often
 | ||||
|  |  | |||
|  | @ -6354,17 +6354,20 @@ class binary_reader | |||
| 
 | ||||
|             case 0xF9: // Half-Precision Float (two-byte IEEE 754)
 | ||||
|             { | ||||
|                 const int byte1 = get(); | ||||
|                 const int byte1_raw = get(); | ||||
|                 if (JSON_UNLIKELY(not unexpect_eof())) | ||||
|                 { | ||||
|                     return false; | ||||
|                 } | ||||
|                 const int byte2 = get(); | ||||
|                 const int byte2_raw = get(); | ||||
|                 if (JSON_UNLIKELY(not unexpect_eof())) | ||||
|                 { | ||||
|                     return false; | ||||
|                 } | ||||
| 
 | ||||
|                 const unsigned char byte1 = static_cast<unsigned char>(byte1_raw); | ||||
|                 const unsigned char byte2 = static_cast<unsigned char>(byte2_raw); | ||||
| 
 | ||||
|                 // code from RFC 7049, Appendix D, Figure 3:
 | ||||
|                 // As half-precision floating-point numbers were only added
 | ||||
|                 // to IEEE 754 in 2008, today's programming platforms often
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue