22 Commits

Author SHA1 Message Date
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
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
6e2f3e099e Removed utils/functional.hpp 2020-12-04 15:30:46 +11:00
Steve Cotton
5dcd2d301d
Clean up some Cppcheck warnings by passing args as const refs (#4364) 2019-09-20 09:34:19 +02:00
Charles Dang
4a3be684f4 Removed trailing tabs and whitespaces from C++ source
[ci skip]

I ran the same command from 9b7b1751fdda.

Excludes:
* lua/
* spirit_po/
2019-08-04 22:31:10 +11:00
Martin Hrubý (hrubymar10)
674fda85b7 Migrate links to https if available - Fwd c18537edc0678f40a209797d72dfaba3e5e88545
(cherry-picked from commit bc4d22dc72e79c3d6a3364ac896e473afd298246)
2018-10-07 03:23:36 +00:00
gfgtdf
7c13c40e1a fix chat during [delay] and animations
fixes #1856

(cherry-picked from commit 274da80788b3ec1c2517a9ed305d796d688382d3)
2018-10-07 03:18:16 +00: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
8d608f65f5 Adding missing and fixed incorrectly formatted copyright notices 2017-03-24 08:26:06 +11:00
gfgtdf
a6b114f6ae use boost asio on clientside wesnothd connection
The main advantage is that the new code is much shorter and easier to
understand then the preivous one.

It currently still used the network::error class on some places

This also removed support for 'ping' packages, the plan is to replace it
with SO_KEEPALIVE

Also this temporaily breaks the gui2 lobby since it still uses the old
network code.
2016-06-05 14:50:53 +02:00
Charles Dang
0ca4e6c943 Convert uses of boost functional to standard library variants
This commit converts the following function calls:

* boost::bind                          -> std::bind
* boost::function and boost::functionN -> std::function
* boost::ref and boost::cref           -> std::ref and std::cref
* boost::bad_function_call             -> std::bad_function_call

In the process, it was discovered that std::bind has trouble with overloaded
functions. There were two such cases in the code:

* gui2::twindow had an ancient unused overload to draw(). The overload was removed.
* gui2::trepeating_button was binding tdispatcher::fire. This case was converted
  to a lambda.
2016-04-04 02:20:52 +11:00
gfgtdf
14616607f5 fix some spelling in comments. 2014-12-29 22:48:16 +01:00
Chris Beck
32dc07478f revert and fixup boost/function.hpp external include guards 2014-06-29 11:40:53 -04:00
Chris Beck
ae39fe4e8a Revert "put include guards on boost/function"
This reverts commit 8f0fe88635c0a06969b7f49b13e4fb74b066b317.
2014-06-29 11:07:25 -04:00
Chris Beck
8f0fe88635 put include guards on boost/function
According to clang boost/function.hpp does not have include guards,
and from inspecting clang diagnostics we include it many times
in several compilation units. This commit adds an external include
guard to all of our includes of this header, it was made using

find . -type f -exec sed -i 's/^#include <boost\/function\.hpp>$/\n#ifndef I

and inspecting the results.
2014-06-19 13:58:58 -04:00
Mark de Wever
e35f4bb501 Strip trailing whitespace. 2014-06-09 15:26:19 +02:00
gfgtdf
8a998964ac use boost::ref in boost::bind 2014-04-23 23:03:13 +02:00
gfgtdf
b3c94dd51f fixup wait_for_upload 2014-04-23 22:13:11 +02:00
gfgtdf
847067dac7 fix bug chat during action
when a player chats while multiple actions from another player are
executed on the local machine we before got an assertion error becasue
replay s add_command expects that there are no other commands yet to be
processed on the replay.
(this was broken at da4cdef146bf5a1b8026f12d6b1caa6c1cd20602)
we now fix this problem by ensuring that there is never more data on the
replay than needed.

for this purpose i wrote that playturn_network_adapter.cpp whose main
purpose it to split incoming [turn]s into smaller [turn]s
we also don't need the backlog anymore because now with playturn_network_adapter we only feed process_network_data with small data pieces that can always be handled at once.

I also removed the replay_ member of turn_info.
Before, we read actions from replay_srouce and wrote actions to recorder.
And after the actions in replay_source has been executed they had been pushed into recorder.
With get_user_choice this doesn't work, because we might end up pushing the 'answer' (the user choice) of a get_user_choice in the recorder while the 'question' (the invoking user action) was in replay_source and then would be pushed onto the recorder after the 'answer', leading to a wrong order in the recorder. This could maybe also have been fixed by always pushing user choices into replay_source, and syncing the replay_source somehow after we enter a user choice, but the way it was done in this commit seemed easier.

note that replay_ and backlog were already made unused in da4cdef146bf5a1b8026f12d6b1caa6c1cd20602 (that was a rather uncomplete commit)
We maybe (i didnt test, just a guess) could also fix this bug by using add_nonundoable_command instead of add_command for nonundoable commands in replay.cpp with add_nonundoable_command  defined as:
config& add_nonundoable_command()
{
	auto c = cfg_.add_child_at("command",config(), pos_);
	pos_++;
	return c;
}
One reason why i decided against it is, that i feared add_child_at to be slow (vector::insert) if there are a lot of entries in cfg_ (for example when we join game that has already run may turns).
With the playturn_network_adapter this shouldn't be an issue anymore, but it also isnt needed anymore.
2014-04-11 23:04:57 +02:00