[Commits] [wesnoth/wesnoth] c86b90: Add `count_leading_ones` function

GitHub noreply at github.com
Sun Oct 26 19:12:20 UTC 2014


  Branch: refs/heads/1.12
  Home:   https://github.com/wesnoth/wesnoth
  Commit: c86b905fef5dcd71abf1c91517f663b5cfdef0e5
      https://github.com/wesnoth/wesnoth/commit/c86b905fef5dcd71abf1c91517f663b5cfdef0e5
  Author: 8573 <8573dd at gmail.com>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/tests/test_util.cpp
    M src/util.hpp

  Log Message:
  -----------
  Add `count_leading_ones` function

Add the following function in `src/util.hpp`:

    template<typename N> inline unsigned int count_leading_ones(N n);

This function returns the quantity of leading `1` bits in `n`.

Conflicts:
	src/util.hpp


  Commit: 121f9bc9a997b071dc75b2268bc1ac921087f220
      https://github.com/wesnoth/wesnoth/commit/121f9bc9a997b071dc75b2268bc1ac921087f220
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/SConscript
    A src/serialization/ucs4_iterator_base.hpp
    A src/serialization/unicode.cpp
    A src/serialization/unicode.hpp

  Log Message:
  -----------
  backport our unicode functionality

This commit backports the src/serialization/unicode files.
I'm not sure exactly why they weren't backported before, probably
it was thought not necessary. However it will be hard to backport
gfgtdf's unicode fixes without this, and I don't see that it can
hurt.

There were some other issues relating to unicode that were not
backported in this manner, for instance in master the addon code
uses the unicode functions but in 1.12 it uses some slightly
different code. We should perhaps roll that over as well.


  Commit: 22593965f2294b942fd0b701855579bf8ca3c870
      https://github.com/wesnoth/wesnoth/commit/22593965f2294b942fd0b701855579bf8ca3c870
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/clipboard.cpp

  Log Message:
  -----------
  copy characters from clipboard as unicode on windows.


  Commit: 85edffbd54dc2ed1737bf2e060cddbf265d3ebcd
      https://github.com/wesnoth/wesnoth/commit/85edffbd54dc2ed1737bf2e060cddbf265d3ebcd
  Author: gfgtdf <tischpapier at gmail.com>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/filesystem.hpp

  Log Message:
  -----------
  remove comment

SDL_RWops is returned by pointer so we don't need to worry about the msvc bug.


  Commit: c9b9422a6b6017f478e4e269935835e210639c17
      https://github.com/wesnoth/wesnoth/commit/c9b9422a6b6017f478e4e269935835e210639c17
  Author: gfgtdf <tischpapier at gmail.com>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/clipboard.cpp

  Log Message:
  -----------
  fixup windows clipboard


  Commit: 67b2b886cae6d641575f2f5b603e6e166f01b1f0
      https://github.com/wesnoth/wesnoth/commit/67b2b886cae6d641575f2f5b603e6e166f01b1f0
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/clipboard.cpp

  Log Message:
  -----------
  allow copying unicode in wesnoth

this completes a previous commit which enabled pasting unicode.


  Commit: 25f6e2c8077e4ad10cc572b98c7f89123f3ea269
      https://github.com/wesnoth/wesnoth/commit/25f6e2c8077e4ad10cc572b98c7f89123f3ea269
  Author: gfgtdf <tischpapier at gmail.com>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M SConstruct

  Log Message:
  -----------
  add scons check for boost_locale for windows

TODO: maybe the file scons/boost.py should also be changed?
Conflicts:
	SConstruct


  Commit: ff78b1a9f587949e726baf302dd716a6b2d0aaf1
      https://github.com/wesnoth/wesnoth/commit/ff78b1a9f587949e726baf302dd716a6b2d0aaf1
  Author: gfgtdf <tischpapier at gmail.com>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/font.cpp

  Log Message:
  -----------
  add { } to BOOST_FOREACH


  Commit: 06d65b20831fcda6807c8c03f9385dbf8d9fc0e3
      https://github.com/wesnoth/wesnoth/commit/06d65b20831fcda6807c8c03f9385dbf8d9fc0e3
  Author: gfgtdf <tischpapier at gmail.com>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/font.cpp

  Log Message:
  -----------
  fix use of ...A( winapi functions for fonts.


  Commit: 3b76009e20ce7bf0be8bc464e4a238c200eb0e1c
      https://github.com/wesnoth/wesnoth/commit/3b76009e20ce7bf0be8bc464e4a238c200eb0e1c
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/scripting/lua.cpp

  Log Message:
  -----------
  make lua dofile use our filesystem functions


  Commit: ab3b446dbd625892a5fef8b1b7f1044db1b32704
      https://github.com/wesnoth/wesnoth/commit/ab3b446dbd625892a5fef8b1b7f1044db1b32704
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/filesystem_boost.cpp

  Log Message:
  -----------
  fix filesystem_boost.cpp on mingw

this raises our dependency for boost iostream to 1.44 or above

Conflicts:
	src/filesystem_boost.cpp


  Commit: 5e256c52a3c50b4a1e99849d16cfdba0ca3bc730
      https://github.com/wesnoth/wesnoth/commit/5e256c52a3c50b4a1e99849d16cfdba0ca3bc730
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/filesystem_boost.cpp

  Log Message:
  -----------
  add boost 1.44 comability

it seems like iostream from boost 1.44 is incompatible to filesystem
from boost  1.44.
Actualy i didnt veryfy this becasue i don't have boost < 1.50. I added
an adapter for boost filesystem that made it looks liek filesystem 1.43
which we can pass to boost iostreams 1.44.

Conflicts:
	src/filesystem_boost.cpp


  Commit: abfb75d3313f6e28a27957dad9fd4c3fd314da70
      https://github.com/wesnoth/wesnoth/commit/abfb75d3313f6e28a27957dad9fd4c3fd314da70
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/util.hpp

  Log Message:
  -----------
  fix msvc warning


  Commit: cdd35a4bead50ffbdfb96cc384c42d48f877b2ed
      https://github.com/wesnoth/wesnoth/commit/cdd35a4bead50ffbdfb96cc384c42d48f877b2ed
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    A src/serialization/ucs4_convert_impl.hpp
    M src/serialization/unicode.cpp
    M src/serialization/unicode.hpp
    A src/serialization/unicode_cast.hpp
    A src/serialization/unicode_types.hpp

  Log Message:
  -----------
  make unicode_cast more generic

unicode_cast is now a template function that works with different types
of containers. Especialy it now works with both std::wstring and
vector<wchar_t>

Conflicts:
	src/gui/auxiliary/event/handler.cpp


  Commit: 2205e6d828024c964800407a6b85036789e983d4
      https://github.com/wesnoth/wesnoth/commit/2205e6d828024c964800407a6b85036789e983d4
  Author: gfgtdf <tischpapier at gmail.com>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/serialization/ucs4_convert_impl.hpp

  Log Message:
  -----------
  fix signed unsigned comprision


  Commit: f9a797dc6eedc3f87094026088fdce8c3a51a03b
      https://github.com/wesnoth/wesnoth/commit/f9a797dc6eedc3f87094026088fdce8c3a51a03b
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/serialization/ucs4_iterator_base.hpp
    M src/serialization/unicode.cpp
    M src/serialization/unicode.hpp

  Log Message:
  -----------
  simplyfy utf8::iterator implementation


  Commit: a6b1dff28ae4d961d5027b982408f349e04263a5
      https://github.com/wesnoth/wesnoth/commit/a6b1dff28ae4d961d5027b982408f349e04263a5
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/serialization/ucs4_iterator_base.hpp
    M src/serialization/unicode.hpp

  Log Message:
  -----------
  remove double declarations in unicode.hpp


  Commit: ee5e245fd237c173708e02e1193b7dfbab84b3ae
      https://github.com/wesnoth/wesnoth/commit/ee5e245fd237c173708e02e1193b7dfbab84b3ae
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/filesystem_boost.cpp

  Log Message:
  -----------
  add custom codecvt for better error mesages.

this codecvt gibes errormessages in LOG_FS if it meets an invalid utf8 char.
also the boost codecvt seems inconsistetn becasue it seems on msvc it acepts utf8 AND ansi while it only accpets ansi on mingw.

Conflicts:
	src/filesystem_boost.cpp


  Commit: da7d1396db34dc72048aa4db76e562c510aaeeb3
      https://github.com/wesnoth/wesnoth/commit/da7d1396db34dc72048aa4db76e562c510aaeeb3
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/commandline_options.cpp
    M src/commandline_options.hpp
    M src/game.cpp
    M src/tests/test_commandline_options.cpp
    M src/tests/test_mp_connect.cpp

  Log Message:
  -----------
  use unicode programm args on windows

Conflicts:
	src/game.cpp


  Commit: e32a474c02f1eae3dc3a5f0bc477f947a730a138
      https://github.com/wesnoth/wesnoth/commit/e32a474c02f1eae3dc3a5f0bc477f947a730a138
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/filesystem_boost.cpp

  Log Message:
  -----------
  fix missing inclide (backport error)

The include of boost locale was missed when backporting this
commit:

0ba4e1488fd9bc301abe5f873016c9bdc84353fe


  Commit: d4d42114eb6c590580b858182b694f15bff2edd5
      https://github.com/wesnoth/wesnoth/commit/d4d42114eb6c590580b858182b694f15bff2edd5
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M .travis.yml

  Log Message:
  -----------
  use gcc 4.8 on travis


  Commit: 0d38bfa695ad592e91bdd0b09ac93906de9a7213
      https://github.com/wesnoth/wesnoth/commit/0d38bfa695ad592e91bdd0b09ac93906de9a7213
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/hotkey/hotkey_item.cpp
    M src/serialization/unicode_cast.hpp

  Log Message:
  -----------
  fix unicode cast

Conflicts:
	src/hotkey/hotkey_item.cpp


  Commit: 84ed48a3342079d41555e3312dde8c99466a5e6c
      https://github.com/wesnoth/wesnoth/commit/84ed48a3342079d41555e3312dde8c99466a5e6c
  Author: gfgtdf <tischpapier at gmail.com>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/scripting/lua.cpp

  Log Message:
  -----------
  cstyle_cast -> static_cast


  Commit: 079b2d48e60cf059934dae940ed3ffad2a963055
      https://github.com/wesnoth/wesnoth/commit/079b2d48e60cf059934dae940ed3ffad2a963055
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/scripting/lua.cpp

  Log Message:
  -----------
  fix lua stacktraces


  Commit: 9aa64d1b6fc35d14f3ce634613c595452c0f50df
      https://github.com/wesnoth/wesnoth/commit/9aa64d1b6fc35d14f3ce634613c595452c0f50df
  Author: gfgtdf <f492343 at rmqkr.net>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/scripting/lua.cpp

  Log Message:
  -----------
  make lua require use our filesystem functions

previously only lua dofile did this.


  Commit: d9f3150be5795fe621cbf7ce2967102d3433d9e9
      https://github.com/wesnoth/wesnoth/commit/d9f3150be5795fe621cbf7ce2967102d3433d9e9
  Author: gfgtdf <tischpapier at gmail.com>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M src/filesystem_common.cpp

  Log Message:
  -----------
  Update filesystem_common.cpp


  Commit: ca2015e2b52fe3efadfc4116e1b7039f9a00af6b
      https://github.com/wesnoth/wesnoth/commit/ca2015e2b52fe3efadfc4116e1b7039f9a00af6b
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M .travis.yml

  Log Message:
  -----------
  try to fix travis for 1.12


  Commit: 975b2acb0b6384fa1a82717af1c1779dbdceab7d
      https://github.com/wesnoth/wesnoth/commit/975b2acb0b6384fa1a82717af1c1779dbdceab7d
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-10-26 (Sun, 26 Oct 2014)

  Changed paths:
    M .travis.yml
    M SConstruct
    M src/SConscript
    M src/clipboard.cpp
    M src/commandline_options.cpp
    M src/commandline_options.hpp
    M src/filesystem.hpp
    M src/filesystem_boost.cpp
    M src/filesystem_common.cpp
    M src/font.cpp
    M src/game.cpp
    M src/hotkey/hotkey_item.cpp
    M src/scripting/lua.cpp
    A src/serialization/ucs4_convert_impl.hpp
    A src/serialization/ucs4_iterator_base.hpp
    A src/serialization/unicode.cpp
    A src/serialization/unicode.hpp
    A src/serialization/unicode_cast.hpp
    A src/serialization/unicode_types.hpp
    M src/tests/test_commandline_options.cpp
    M src/tests/test_mp_connect.cpp
    M src/tests/test_util.cpp
    M src/util.hpp

  Log Message:
  -----------
  Merge branch 'fixup_ansi_win_api_and_fs' into 1.12


Compare: https://github.com/wesnoth/wesnoth/compare/f1c71a1eb781...975b2acb0b63


More information about the Commits mailing list