Commit Graph

24 Commits

Author SHA1 Message Date
Ian Taylor
9f2781b527 Fix clang format (#854)
Fix invocation of clang-format in CMakeLists and apply clang-format.
2020-04-29 09:40:33 -05:00
Ted Lyngmo
9ab22ef493 Make SettingChange and StreamCharSourcemove constructors and assignment operators noexcept (#808)
The explicitly defaulted or implemented move constructors and assignment
operators are made "noexcept".

Bugfix:
* src/stream.cpp Stream::Stream() char_traits::int_type intro[4] is
  now aggregate-initialized (to zero) to avoid UB.

Minor changes:
* Using std::isinf() and std::signbit() instead of comparing for
  equality with infinity.
* src/streamcharsource.h: Added #include "stream.h".
* src/stream.h: Forward declaring "class StreamCharSource".
* Some implicit casting changed into static_cast's.

Signed-off-by: Ted Lyngmo <ted@lyncon.se>
2020-02-04 16:58:00 -06:00
Andy Maloney
6e87b37034 Modernize: Use "using" instead of "typedef" (#754) 2019-10-02 11:14:49 -05:00
Ted Lyngmo
0d5c57150c Apply formatting/style tweaks to comply with compile time diagnostics for g++ and clang++ (#686)
* Add compilation flags: -Wshadow -Weffc++ -pedantic -pedantic-errors
* Delete implicit copy & move constructors & assignment operators
  in classes with pointer data members.
* An exception to the above: Add default copy & move constructors &
  assignment operators for the Binary class.
* Convert boolean RegEx operators to binary operators.
* Initialize all members in all classes in ctors.
* Let default ctor delegate to the converting ctor in
  Binary and RegEx
* Don't change any tests except regex_test (as a result of the change
  to binary operators).

Note: https://bugzilla.redhat.com/show_bug.cgi?id=1544675 makes
-Weffc++ report a false positive in "include/yaml-cpp/node/impl.h".
2019-03-13 15:18:34 -07:00
Jesse Beder
25c466a152 Run clang-format 2015-03-29 21:27:20 -05:00
Jesse Beder
ad712c4f2d Add EmitterStyle, which will allow sequence or map style (i.e., flow or block) to be preserved between parsing and emitting 2015-01-24 12:19:20 -06:00
Jesse Beder
114db22335 Fix UTF16 parsing for multi-byte characters 2014-03-23 20:24:36 -05:00
Jesse Beder
06bf012d81 clang-format 2014-03-23 20:08:54 -05:00
Jesse Beder
5fd25df859 Run IWYU 2014-03-22 22:46:04 -05:00
Jesse Beder
9b4db068bb Run clang-format 2014-03-22 12:49:16 -05:00
Jesse Beder
4ca9269e24 Patched signed -> unsigned warning (issue 98) 2012-02-14 10:11:44 -06:00
Jesse Beder
860365b263 Switched the utf bom checking to putback in the stream (instead of keeping a secondary buffer), which fixes a bug when there's only one ascii character 2011-10-20 22:29:41 -05:00
Jesse Beder
fe57829aca Removed crt stuff (we can do memory leak checking in Linux easier) 2009-10-27 14:55:01 +00:00
Jesse Beder
b1ce042535 Collected pos, line, and column into a Mark struct 2009-07-27 02:56:18 +00:00
Jesse Beder
b929eb94a0 Merged utf branch changes r178:187 into the trunk 2009-07-10 03:10:03 +00:00
Jesse Beder
9a1a3974c6 Patch for gcc -Wall (order of initialization) 2009-05-29 22:36:52 +00:00
Jesse Beder
b3a5a519f2 Merged aliases branch into trunk, changes r100:150 2009-05-22 21:48:05 +00:00
Jesse Beder
9d0e0c6a48 Fixed several bugs from the new file i/o setup.
In particular:
1. Windows CR/LF weren't read properly (issue #11)
2. Scanning wasn't reading EOF properly
3. Documents may be empty (this was old, I think)
Also fixed some VS2008 warnings on /W4.
2009-02-07 07:57:13 +00:00
Jesse Beder
f9c0725684 Switched to reading the entire file into a buffer at the start.\nThis speeds it up a TON (like 100x). 2009-02-01 20:48:43 +00:00
Jesse Beder
45322566c7 Set the eol style to native for all files. 2008-09-03 22:20:39 +00:00
Jesse Beder
5c0db0d21b Unified line endings. 2008-09-03 22:17:17 +00:00
Jesse Beder
ec2ecad197 Added CMake scripts for other platforms\nFixed some bugs that gcc complained about\nFixed CR/LF vs LF bug 2008-08-07 03:30:56 +00:00
Jesse Beder
09d7ab365f Replaced the queue of Token pointers with values.
We were getting memory leaks (as told by the CRT detectors, which I also added), and there's really no reason (as long as we're careful) to use pointers there.
2008-07-20 05:02:01 +00:00
Jesse Beder
cadc04ce47 Moved all code to src/ and include/ directories. 2008-07-14 04:33:30 +00:00