turleypol
24c8c8b92f
Tidy modernize for loops ( #862 )
...
* trigger loop convert
* Automated clang-tidy change: modernize-loop-convert
* fixed refactor
* Automated clang-tidy change: modernize-loop-convert
* compile
* first look through
* fixes and start to use a few ranges
* revert autogenerated file
* compilation fix
* second pass
* renamed loop variable
---------
Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-31 09:14:02 +01:00
turleypol
da2943acb8
Tidy copy initialization ( #859 )
...
* trigger tidy
* copy&move BApplicPtr obj
always commit tidy changes
* move PolObject
* fix house add_component
* Automated clang-tidy change: performance-unnecessary-copy-initialization,performance-unnecessary-value-param
* Revert "Automated clang-tidy change: performance-unnecessary-copy-initialization,performance-unnecessary-value-param"
This reverts commit bb6aab13dbdfa4aaf420cdaafaf22940f241fc5b.
* performance-unnecessary-value-param gives some weird suggestions
* Automated clang-tidy change: performance-unnecessary-copy-initialization
* minor performance improvements
* added used tidy check
* missing dependency
* renamed build so its no longer requires?
* better add docs for the sneaky fix
* silence pr check, not all headers can be compiled seperatly
---------
Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-19 08:17:28 +01:00
turleypol
bce1154d7a
ClangTidy readability-else-after-return ( #857 )
...
* trigger tidy
* Automated clang-tidy change: readability-else-after-return
* compile test
* rerun
* Automated clang-tidy change: readability-else-after-return
* trigger..
* Automated clang-tidy change: readability-else-after-return
* manually removed a few
* Automated clang-tidy change: readability-else-after-return
* removed duplicate code
* fix remaining warnings
* fixed scope
---------
Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-18 09:35:52 +01:00
turleypol
c882c42a31
misc clang-tidy ( #853 )
...
* trigger tidy
* Automated clang-tidy change: modernize-use-equals-delete,modernize-make-shared,modernize-make-unique,modernize-use-constraints,readability-container-size-empty,modernize-redundant-void-arg,modernize-use-emplace
* removed non needed macros
* missed to disable tidy build
---------
Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-16 12:22:43 +00:00
turleypol
58a6db75be
Integer overflow when using GetConfigInt ( #844 )
...
* impptr_if now accepts also const BObjectImp*
* cfg::GetConfigInt returns error if the value would produce an overflow
code cleanup of cfgmod
added tests
* increase test coverage
* added comment why the exception should be catched without reaction
fixed member_id test
* added corechanges
its 2026
removed else
2026-01-04 13:22:11 +01:00
Kevin Eady
ec344a395d
Add support for sequence and index bindings ( #760 )
...
* update grammar
* add ast nodes; ast building
* Rename to unpacking
* semantic analysis
* executor work part 1, unpacking indices
* renamings; implement index binding
* small cleanup
* use multi_index; more tests
* use multi_index only for rest, otherwise list
* initial formatting
* add missing token decoding
* address self-review comments
* formatting tweaks
* add test for var binding in classes
* add StringIterator
* fix spread tests
* add cfgfile iterator; add cfgelem opersubscript; tests
* add iterator for SQLResultSet and SQLRow; tests
* Copy value in take global/local
* Allow any iterable can index rest unpacking
Always use dictionary as rest object in index unpacking
* add docs, core-changes, doc tests
* formatting changes...
* address self-review comments
* update formatter, format all binding test srcs
* address review comments
- unset var scope
* add cfgfile/cfgelem docs
* reformat objref svg
2025-02-17 21:59:42 +01:00
turleypol
cf0c730181
switched impptr to template with default type ( #680 )
2024-08-03 12:35:01 +02:00
turleypol
28556ecaf5
Appendcfgelem error ( #358 )
...
* added error check if file could not be opened for AppendCfgElem.
* added docs
2020-12-17 22:06:05 +01:00
Kevin Eady
12d6186d10
Script option enhancements ( #118 )
...
* Fix SCRIPTOPT_CAN_ACCESS_OFFLINE_MOBILES
* Add SCRIPTOPT_SURVIVE_ATTACHED_DISCONNECT
* wip beginning work on templatization
* Use PolModule in pol-specific modules
* wip, creating PolModule with getXYZParam
* wip 1, moving getXYZ to UOExecutor
* compilable with PolObjectImp / PolApplicObj
* add type guard
* wip, change signatures
change signatures of script_method, script_method_id, and
custom_script_method
* compilable (windows)
* linux fixes
* namespace fixes
* remove uoexhelp
* formatting
* compilable
- move can_access_offline_mobiles back to uoexec
- add guildscrobj and partyscrobj sources
- move EGuildRefObjImp and EPartyRefObjImp
- wip, implement asUOExec
- formatting uoexec.cpp,.h
* finish uoexec() helper
* some cleanup
2020-02-08 09:21:35 +01:00
turleypol
7e8f92bc85
rewrote module function generation, maybe this works
2019-11-10 22:04:08 +01:00
Kevin Eady
ca850a0c76
project refactoring
2019-10-18 21:32:30 +02:00
Kevin Eady
5c0fb7c4ea
First support for .em-parsed module function tbls
...
- Create module parser custom target
- Include generated tables in .cpp sources
- Standardize module function names based off .em names
2019-10-17 22:37:26 +02:00
Kevin Eady
b55e852a5b
wip 1
2019-10-17 19:08:49 +02:00
esdete
dc2d29b433
NULL to nullptr
2018-07-31 14:30:29 +02:00
turleypol
dbb25bdb62
Include and buildsystem cleanup ( #45 )
...
Include cleanup
Reworked buildsystem (Linux only)
Removed dynamic libs, Linux now again uses static linking (like windows)
2018-01-29 21:55:48 +01:00
turleypol
798eda5b63
Cleanup of header includes.
2018-01-01 21:52:14 +01:00
Fernando Rozenblit
eb34290222
Cleanup for modules' function tables
2017-01-24 21:57:16 +01:00
turley
f9c3db9e41
Modules share the same (helper) template base class
...
Optimize function name search for all modules not only uo by using an additional map, replaced c array with vector for functionsdef.
Simplified pragma pack order. (MSVC version is supported in all
compilers)
Removed compilerassert.h (asserteql,..) replaced with static_assert
Removed some old #ifs
2016-12-20 23:53:32 +01:00
turley
4d9aa75f3b
Corrected definition order in module defs
2016-12-14 21:50:23 +01:00
turley
189cad3479
Formating everything
...
Authors are not forced to use the clang-format setting, but should
atleast be inspired by the style.
The only thing which is now not allowed are tabs for ident/alignment!
2016-02-19 19:26:35 +01:00
turley
ed7b16b233
normalized lineendings
2016-02-11 22:54:43 +01:00
Gabriele Tozzi
d1ac902926
Documentation: reformatted headers for DoxyGen
2016-01-28 14:52:40 +01:00
Gabriele Tozzi
45959b92d2
Small memory improvement: BObjectImp.type_ is now u8 instead of int
...
It is very unlikely to grow to more than 256 elements any time soon.
This should save 3 bytes for every single object that derived from it.
Also added explicit int conversions and a not, for better robustness.
2015-12-29 03:21:02 +01:00
frozenblit
c4cb100279
Some more stl_inc.h cleanups
2014-11-01 19:16:13 +01:00
turley
99d7dc3037
namespaces...finally :)
...
Hard part is finished every file is touched. Namespaces are currently rough named by directory name.
Maybe we could split it more
2013-12-21 09:10:46 +00:00
dsourc
cf40b94214
Added cfgfile::GetConfigIntArray
...
Fixed 3 warnings in uoscrobj.cpp
2013-09-18 17:45:34 +00:00
turley
4c7f70fc79
first version of a generic message_queue (currently not lockfree, need to test more)
...
replaced old auto_ptr with unique_ptr
2013-09-13 18:07:19 +00:00
frozenblit
cba6acaaa5
Some more cleanup from code analysis. Added auto_ptr in a few places to avoid
...
leaks after exceptions.
2012-01-02 23:48:26 +00:00
frozenblit
a37d7e3f96
Fixed memory leak in cfgfile::GetConfigStringDictionary(...)
2011-11-27 22:22:05 +00:00
turley
d32cec7d6c
Added: basic::TypeOfInt( expr ) + basic.em constants
...
returns like TypeOf() the type of given parameter, but returns instead of a string an integer (see basic.em constants)
since integer comparison are way faster then string comparison this function should always be used for comparisons
2011-03-12 10:51:10 +00:00
frozenblit
eb61009c6e
Fixed some possibilities of leaking if an exception was thrown and a few other warnings (all the rest, code analysis)
2010-07-10 20:02:50 +00:00
turley
e10cd27cea
sync: shini - long to int (prerequisit for 64-bit)
2010-03-29 14:52:03 +00:00
turley
7a2addff8d
Fixed: StrReplace,SubStrReplace return "Invalid parameter type" instead of crashing if non string object
...
is given as to_replace, replace_with
Fixed: Several small memoryleaks
2010-02-16 12:46:55 +00:00
muaddib_pol
c301d80817
+ code organizational updates in the modules
...
+ Updated to-do and post-build
+ Renamed the mkdist7 and .vc7 since works on vc9 too just fine.
2009-09-06 21:42:46 +00:00
muaddib_pol
49072c3c41
+ To-Do file updates
...
+ Beginning of Mobile and Module source file organization
+ Makefile.Gcc updates
2009-09-06 14:11:24 +00:00