File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 1+ ## 0.9.14 (May 27, 2022)
2+ - ` BUGFIX ` - Fixes C4310 warning. ([ #19 ] ( https://github.com/pulzed/mINI/issues/19 ) )
3+
14## 0.9.13 (April 25, 2022)
25- ` BUGFIX ` - Writer now understands UTF-8 BOM-encoded files. ([ #7 ] ( https://github.com/pulzed/mINI/issues/17 ) )
36- ` BUGFIX ` - Fixes a bug introduced in 0.9.12 where reader would break when reading empty files.
Original file line number Diff line number Diff line change 11# mINI
22
3- v0.9.13
3+ v0.9.14
44
55## Info
66
Original file line number Diff line number Diff line change 2323
2424// /////////////////////////////////////////////////////////////////////////////
2525//
26- // /mINI/ v0.9.13
26+ // /mINI/ v0.9.14
2727// An INI file reader and writer for the modern age.
2828//
2929// /////////////////////////////////////////////////////////////////////////////
@@ -349,7 +349,11 @@ namespace mINI
349349 static_cast <char >(fileReadStream.get ()),
350350 static_cast <char >(fileReadStream.get ())
351351 };
352- isBOM = header[0 ] == (char )0xEF && header[1 ] == (char )0xBB && header[2 ] == (char )0xBF ;
352+ isBOM = (
353+ header[0 ] == static_cast <char >(0xEF ) &&
354+ header[1 ] == static_cast <char >(0xBB ) &&
355+ header[2 ] == static_cast <char >(0xBF )
356+ );
353357 }
354358 else {
355359 isBOM = false ;
@@ -708,7 +712,11 @@ namespace mINI
708712 if (fileWriteStream.is_open ())
709713 {
710714 if (fileIsBOM) {
711- const char utf8_BOM[3 ] = {(char )0xEF , (char )0xBB , (char )0xBF };
715+ const char utf8_BOM[3 ] = {
716+ static_cast <char >(0xEF ),
717+ static_cast <char >(0xBB ),
718+ static_cast <char >(0xBF )
719+ };
712720 fileWriteStream.write (utf8_BOM, 3 );
713721 }
714722 if (output.size ())
You can’t perform that action at this time.
0 commit comments