Commit graph

17 commits

Author SHA1 Message Date
Martin Hrubý (hrubymar10)
bc4d22dc72 Migrate links to https if available - Fwd c18537edc0 2018-07-16 19:07:08 +11:00
Matthias Krüger
a2168d2e24 codespell fixes to /src 2018-02-08 21:54:09 +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
Celtic Minstrel
b4dc11ce36 Belated 2017 copyright update 2017-03-19 10:05:38 -04: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
Celtic Minstrel
baed863df0 Don't include config.hpp when possible
Instead, try to forward-declare it only.
2016-02-23 15:41:34 -05: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
gfgtdf
c2d61b3595 fix some copyright notices 2014-10-31 22:35:45 +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 8f0fe88635.
2014-06-29 11:07:25 -04:00
gfgtdf
179c9a9786 add some copyright notices. 2014-06-25 18:02:06 +02: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
Alexander van Gessel
4936876431 Add missing newlines at EOF 2014-05-03 14:28:59 +02:00
gfgtdf
fc8c15e46a add synced_context class
the intention  is to fix #20871 and implement #21697, to sync
prestart/start events, and to implement
http://forums.wesnoth.org/viewtopic.php?f=6&t=39611 in the next patches,

the intention of synced_checkup is to replace random .. set/get_random_results.
Because set/get_random_results didn't have much to do with random, since it was only used to compare unit checksums and attacker damage to replays.

the intention of synced_commands is to move code out of do_replay_handle and make it callable from other places too so that we can just call the same function taht was called from replay in the simple cases (with synced_context::run_in_synced_command).

the object set_scontext_synced can be used to enter the synced context which enables synced_checkup and make the random calls synced.
Or we can use run_in_synced_context which is normaly easier than set_scontext_synced.
we can check wether we are in a synced context with get_syced_state to make addidional checks to detect oos (the other intention of that is to implement #21697 ).

this commit is part of pf 121.
2014-04-02 21:44:52 +02:00