247 Commits

Author SHA1 Message Date
Bernd Amend
cff6a0aced change .clang-format and reformat code with clang-format 11
I initially tried to use the existing .clang-format file,
but it does not match the code style (at least with clang-format 11)
and the formatting is not consistent across files.
Therefore, I decided to rewrite the .clang-format with some personal
preferences.

Used command
  find . -iname "*.hpp" -o -iname "*.cpp" | xargs clang-format -i -style=file
2021-05-24 10:44:15 +02:00
Bernd Amend
e8e47173fb fix a couple of g++s -Wnoexcept warnings 2021-05-22 18:45:08 +02:00
Bernd Amend
1e6263976f don't return voids 2021-05-22 14:05:52 +02:00
Bernd Amend
2b3bddb02d replace typedef with using 2021-05-22 14:04:04 +02:00
Jose Rubio
85e4598986 Fix for warnings: by-copy capture of ‘this’ and unused-local-typedefs
There are two warnings when compiling with GCC 7.4.1 or clang 5.0.1.

   1. warning: explicit by-copy capture of ‘this’ redundant with by-copy capture default
   2. warning: typedef ... locally defined but not used [-Wunused-local-typedefs]

This change removes [2] and it compacts the lambda capture clause in [1].
2020-01-13 16:36:32 +01:00
Joshua Thompson
af7a5d7c49 #487: Fix warning for implicit 'this' lambda capture in C++20. 2019-08-22 10:00:37 -04:00
Vladyslav Tronko
273bc4a94a Fix description of ChaiScriptBasic::use
Add missing word
2019-06-05 15:19:31 +03:00
Jason Turner
a880319db8 Merge branch 'develop' into best_practices 2018-05-30 08:30:29 -06:00
Jason Turner
c19705da5d Merge remote-tracking branch 'origin/c++17' into develop 2018-05-29 13:21:09 -06:00
Jason Turner
2d762c8be3 Update copyrights to 2018 2018-05-29 11:51:15 -06:00
Jason Turner
98c362d038 Properly report which file failed to be loaded
closes #437
2018-05-29 07:45:43 -06:00
Alek Mosingiewicz
b3f77f0c82 Fix implicit conversion warning. 2018-05-25 12:17:22 +02:00
Alek Mosingiewicz
0f67b2f430 Another fix for Clang. 2018-05-25 12:07:50 +02:00
Alek Mosingiewicz
fb635033a9 Fix for Clang. 2018-05-25 11:56:10 +02:00
Alek Mosingiewicz
393f8d31ab Travis build quick fix. 2018-05-25 11:48:27 +02:00
Alek Mosingiewicz
1711d50eff Another attempt to remedy the problem occuring on Clang. 2018-05-25 08:38:25 +02:00
Alek Mosingiewicz
42c355a8d0 Revert "Attempt to remedy the problem occuring on Clang."
This reverts commit 0e964da42658a4e7e5bebe281f2c125575f34246.
2018-05-25 08:06:35 +02:00
Alek Mosingiewicz
0e964da426 Attempt to remedy the problem occuring on Clang. 2018-05-25 07:59:34 +02:00
Alek Mosingiewicz
51693aa0bd Skip buffer initialization. 2018-05-25 06:57:22 +02:00
Alek Mosingiewicz
51bb793664 Initialize buffer to store potential BOM data before storing
anything inside it.
2018-05-24 22:06:59 +02:00
Alek Mosingiewicz
edadb7aa98 Use readsome instead of reading the stream byte-by-byte to
detect BOM in processed file.
2018-05-24 22:04:10 +02:00
Alek Mosingiewicz
ac10575b5f Read the stream byte by byte, condition for size when skipping BOM. 2018-05-24 21:38:47 +02:00
Alek Mosingiewicz
4ada12a34c Check EOF rather than buffer_size when skipping BOM. 2018-05-23 18:41:07 +02:00
Alek Mosingiewicz
f9615efea5 Another text size assertion. 2018-05-22 16:27:19 +02:00
Alek Mosingiewicz
60c0a0bf15 Refactor skippable BOM detection. 2018-05-21 17:04:33 +02:00
Alek Mosingiewicz
c09af92963 Decrement file size when BOM is present to avoid parsing errors. 2018-05-13 13:09:38 +02:00
Alek Mosingiewicz
a024db040d Catch BOM at the beginning of file. 2018-05-13 12:24:34 +02:00
Tomas Zeman
3dec2af071 Fix potential conversion warning on some platforms 2018-03-09 10:19:33 +01:00
Jason Turner
eb93760f1b Fix building on MSVC in C++17 mode
Closes #403 #396 #395
2018-01-19 10:26:31 -07:00
Jason Turner
6bfc130b73 Fix pull from develop, fix gcc warnings 2017-12-16 11:50:32 -07:00
Jason Turner
6ae3f2d187 Merge remote-tracking branch 'origin/develop' into best_practices 2017-11-21 16:28:12 -07:00
Jason Turner
28a59d2a6e Avoid creating vectors when possible 2017-11-16 09:10:48 -07:00
Stephen Berry
ff78d31583 Simplified namespace handling code and requiring all namespace registration to allow for delayed generation. This simplifies generating namespaces by the user and leads to more efficient code. 2017-09-05 13:26:55 -05:00
Stephen Berry
a9fc1d492e Merge branch 'develop' of https://github.com/ChaiScript/ChaiScript into develop 2017-09-05 12:13:29 -05:00
Stephen Berry
3f299333cc Switched to recursive mutex
Removed namespaces_nested_ref.chai
2017-09-05 12:02:11 -05:00
Jason Turner
bfe7799d13 Come C++17 updates, namespaces, etc 2017-09-02 13:12:52 -06:00
Jason Turner
4213f24761 Various C++17 considerations 2017-08-29 16:14:44 -06:00
Jason Turner
0fc420f69d Revert "Remove exception specification shared_ptr use"
This reverts commit e1cf8b9eb1d59d49149454424ec49bd0d8a3b28f.
2017-08-15 10:13:20 -06:00
Jason Turner
e1cf8b9eb1 Remove exception specification shared_ptr use 2017-08-10 10:28:16 -06:00
Jason Turner
e07cd88659 Add noexcept where appropriate
This modifies no logic, it simply adds the keyword `noexcept`

I believe this is 100% correct. It calls methods that are not
guaranteed to be `noexcept`, such as `operator[]` but have
no logically way of throwing.
2017-07-22 20:33:30 -06:00
Jason Turner
ea03a5462f Wrap up build issues for dropping of shared_ptr 2017-07-18 16:58:09 -06:00
Jason Turner
5a5600914c Move away from shared_ptr for parse nodes 2017-06-21 21:27:48 -06:00
ftk
60c43233c6 More clear error message in load_module 2017-03-05 21:55:01 +03:00
ftk
c2f7ca3aa2 Using runtime stdlib constructor will result in compilation error 2017-03-05 21:48:59 +03:00
ftk
72cb9bd940 Compile out module path search code when module support is disabled 2017-03-05 21:26:01 +03:00
ftk
698dfb06db Loadable module support can be disabled by defining CHAISCRIPT_NO_DYNLOAD 2017-03-05 20:54:01 +03:00
Jason Turner
064a385a64 Merge branch 'develop' of github.com:ChaiScript/ChaiScript into develop 2017-02-22 15:56:04 -07:00
Jason Turner
283785faaf Add PVS Studio and address some issues it found 2017-02-22 15:18:56 -07:00
Jason Turner
40fb8d257e Fix warnings from MSVC 2017-02-22 13:55:02 -07:00
Jason Turner
87f1242ed4 Update copyrights to 2017 2017-02-15 15:55:40 -07:00