Commit Graph

49 Commits

Author SHA1 Message Date
pentarctagon
d674e9f462 automatic copyright update 2025-02-17 12:59:51 -06:00
shijie.chen
d88ddec6f1
Remove unnecessary header files (#8531)
Co-authored-by: shijie.chen <shijie.chen@goland.cn>
2024-03-12 00:07:48 -04:00
pentarctagon
970163813d 2024 copyright update 2024-01-20 22:22:23 -06:00
Pentarctagon
c44cc2742e Copyright update.. 2023-04-29 10:48:11 -05:00
Pentarctagon
340023921d
2022 copyright update. 2022-03-06 19:07:13 -06:00
Pentarctagon
57ce449af8
Re-add attribution to copyright notices.
These are mostly useless and outdated/wrong, but apparently it's probably illegal to remove them.
2021-07-27 20:21:38 -05:00
Pentarctagon
ba75e1af50
Copyright update.
This additionally:
* Makes all copyright notices identical aside from the starting year for Wesnoth-specific source files. Files not included: mariadbpp, lua, spirit po, xbrz, and bcrypt (crypt_blowfish).
* Removes all attribution from the files, since the vast majority of them are outdated or seemingly just outright incorrect. For example, I would guess that Dave is no longer the sole author of the majority of Wesnoth's current code.
2021-07-26 11:38:03 -05:00
Charles Dang
baa1a87a8a Cleaned up excessive indentation and newlines in the AI code 2020-12-02 01:02:24 +11:00
mattsc
626d7ee381 AI: add [filter_own] to all default AI candidate actions
This allows restricting each CA individually to only a subset of the units. It also means that several instances of the same CA can be used in the same AI configuration, in order to, for example, force the order in which units are dealt with, or to apply different settings to different units.
2019-11-21 12:09:33 -08:00
Martin Hrubý (hrubymar10)
674fda85b7 Migrate links to https if available - Fwd c18537edc0
(cherry-picked from commit bc4d22dc72)
2018-10-07 03:23:36 +00:00
Charles Dang
c80e506ca9 AI: deployed std::make_shared in a whole bunch of places
Also simplified a few instance of shared_ptr assignment. No need to create a temp ptr
just to immediately assign them.

(cherry-picked from commit ba150c0298)
2018-10-07 03:19:59 +00:00
Charles Dang
8707a13a2f Cleaned up MSVC error suppression
The following have been enabled. They no longer cause any errors or warnings.
* C4819
* C4355
* C4351
* C4345

The following has been disabled globally and will be handled in individual cases:
* C4996

The following have been moved to the project files (meaning they become global in
their respective projects):
* C4250 (in wesnoth)
* C4244 (in wesnoth, wesnoth-lib, wesnothd, and campaignd)

The following has been left alone since I don't build the unit tests:
* C4702
2018-02-22 01:30:57 +11:00
Charles Dang
f23305f7e2 Formatting cleanup: T const& -> const T& 2018-01-23 01:26:23 +11:00
Gregory A Lundberg
b5f76eff79
Bump copyright to 2018 2018-01-19 00:02:20 -06:00
Charles Dang
2101353d36 Convert include guards to the shorter #pragma once
Turns out I mistook @celticminstrel's opinion that we should use include guards over pragma (737916e).
Since all major compilers support `#pragma once`, there's no reason not to use it.

For future mergability reasons, this excludes src/spirit_po and src/xBRZ. It also excludes src/boost-patched.
2017-05-09 19:41:37 +11:00
Charles Dang
79ca2aaff4 Deployed a few more cases of std::map::emplace
I missed these since somehow the make_pair calls were missing the std namespace specifier.
2017-05-06 22:16:03 +11:00
Celtic Minstrel
b4dc11ce36 Belated 2017 copyright update 2017-03-19 10:05:38 -04:00
Charles Dang
05092ba2f6 Refactor most boost pointer related stuff to use their stdlib counterparts
This constitutes drop-in replacements for:

* boost::shared_ptr
* boost::scoped_ptr
* boost::weak_ptr
* boost::enable_shared_from_this
* boost::static_pointer_cast
* boost::dynamic_pointer_cast

This excludes boost::intrusive_ptr, except for stray includes. Refactoring that is more complicated.
2016-07-25 09:28:42 +11:00
Celtic Minstrel
3ac7f8d970 NULL -> nullptr
A few cases of NULL were missed, since changing them led to errors
(Mainly instances where it was passed to a boost::function)
2016-03-31 00:42:38 -04:00
Celtic Minstrel
17ea7fac6b Reorganize the AI source files a little
This also tries to make them include everything by full paths instead of relative paths.
2016-03-24 00:08:12 -04:00
Charles Dang
34a0b8197b Fixed compilation post-AI refactor 2016-03-23 01:57:35 +11:00
Celtic Minstrel
d00cc80076 Safeguard against accidentally registering an AI component twice 2016-03-22 07:22:22 -07:00
Chris Beck
ba51524f6e update copyright to year 2016
using this shell script:

find src -type f -print0 | xargs -0 sed -i "s|Copyright (C) \([[:digit:]]*\)\([ ]*\)-\([ ]*\)2015|Copyright (C) \1\2-\32016|g"
2016-01-02 23:59:31 -05:00
Ignacio R. Morelle
57ae45387a New Year copyright update 2015-01-01 19:07:35 -03:00
Mark de Wever
c72691524e Remove Doxygen comment.
The parameters documented, do not match the function signature.

The issue was found by Clang 3.4.
2014-01-05 15:39:35 +01:00
Ignacio R. Morelle
a4f47a63c7 New Year copyright update 2014-01-01 02:08:52 -03:00
Eric S. Raymond
043c4f9fd3 Remove $Id$ cookies. 2013-03-26 21:41:37 -04:00
Mark de Wever
43b71f2ff0 New year copyright update. 2013-01-01 09:22:03 +00:00
Ignacio R. Morelle
6ca69b2df5 New year copyright update 2012-01-07 02:35:17 +00:00
Mark de Wever
9af56f9ac5 Strip trailing whitespace. 2011-07-07 19:16:19 +00:00
Dmitry Kovalenko
79a154e9c5 Sticky behaviours now mark themselves to_be_removed...
...when encounter that their bound unit is missing(dead or some other
reason). Also the RCA_Loop was extended to call a function that
removes all the CAs marked to_be_removed, but the functionality was
not implemented completely yet
2011-07-05 13:17:35 +00:00
Mark de Wever
ecbabea838 New year copyright update. 2011-01-01 15:57:50 +00:00
Mark de Wever
3677d2eab2 Remove unneeded includes. 2010-12-05 18:07:50 +00:00
Guillaume Melquiond
eeb047de55 Fixed file headers so that they match the content of the COPYING file. 2010-09-01 21:12:38 +00:00
Mark de Wever
a99c78e0d8 Update doxygen comment.
The filename after the @file comment is optional (spotted by alink).
2010-07-26 21:32:18 +00:00
Guillaume Melquiond
76c34a23d3 Modified WML attributes so that they are stored with...
...smaller effective types when they are not translatable.

This patch considerably reduces the memory footprint of WML and speeds it up.

It should not change any WML behavior, except for a few corner cases
detailled below:

- "off" is no longer a synonym for "no" (it wasn't used anyway),

- _"42" is no longer an integer,

- untranslatable "true" and "false" are stored as booleans, hence
  displayed as "yes" and "no",

- "042" is now understood as octal notation (hence 34) rather than decimal,

- hexadecimal notation "0x42" is now recognized.
2010-05-24 08:01:31 +00:00
Iurii Chernyi
7a9caa4f36 added gamestate_observer class,
...used it to simplify candidate actions interface and implementation,
by making is_gamestate_changed flag managed externally, by rca stage
2010-01-29 23:17:35 +00:00
Mark de Wever
92f5f92ce5 New year copyright update. 2010-01-01 13:16:49 +00:00
Iurii Chernyi
1462573062 refactoring of ai component model to a more object-oriented approach.
[modify_ai] now works fully and uniformly, with less code
duplication. added the ability to see all ai components from
gamestate_inspector.
2009-12-24 22:38:59 +00:00
Iurii Chernyi
58a415ec83 important speed optimization of candidate action evaluation loop...
...ending candidate action evaluation loop if current score is
greater-or-equal than the upper bound of score for remaining candidate
actions
2009-11-11 12:12:10 +00:00
Guillaume Melquiond
742f5ab497 Removed unused class ai::candidate_action_evaluation_exception. 2009-10-03 08:58:45 +00:00
Guillaume Melquiond
b2beb52f0c Removed unused class ai::candidate_action_execution_exception. 2009-10-03 08:58:21 +00:00
Iurii Chernyi
09223f03cc new AI configuration syntax. Note: boost 1.35 required for compilation 2009-08-01 14:17:15 +00:00
Tomasz Śniatowski
1d991f7637 disable msvc warning 4250 in new ai code 2009-06-11 20:54:00 +01:00
Iurii Chernyi
b192e801c8 fixed MSVC compilation error 2009-06-11 18:45:09 +00:00
Iurii Chernyi
2fc7380aa3 AI: stub code for default_ai_testing 2009-06-07 07:46:36 +00:00
Iurii Chernyi
3d25902cc5 fixed a typo, which prevented linking 2009-06-06 20:47:21 +00:00
Mark de Wever
0c4d8330d3 Add virtual destructors. 2009-06-05 17:44:42 +00:00
Iurii Chernyi
59f781e290 new AI: ai_composite 2009-06-04 17:48:27 +00:00