Commit Graph

28 Commits

Author SHA1 Message Date
Loïc Blot 1c1c97cbd1 Modernize source code: last part (#6285)
* Modernize source code: last par

* Use empty when needed
* Use emplace_back instead of push_back when needed
* For range-based loops
* Initializers fixes
* constructors, destructors default
* c++ C stl includes
2017-08-20 13:30:50 +02:00
Loic Blot 90dfafcda2
cavegen.cpp, chat.cpp: modernize code 2017-08-16 08:26:04 +02:00
Loïc Blot 76be103a91 C++11 patchset 9: move hardcoded init parameters to class definitions (part 1) (#5984)
* C++11 patchset 9: move hardcoded init parameters to class definitions

C++11 introduced the possibility to define the default values directly in class definitions, do it on current code

Also remove some unused attributes

* CollisionInfo::bouncy
* collisionMoveResult::collides_xy
* collisionMoveResult::standing_on_unloaded
* Clouds::speed

* More constructor cleanups + some variables removal

* remove only write guiFormSpecMenu::m_old_tooltip
* move header included inside defintions in genericobject.h
* remove some unused since years exception classes
* remove unused & empty debug_stacks_init
* remove unused & empty content_nodemeta_serialize_legacy
* remove forgotten useless bool (bouncy) in collision.cpp code
2017-06-16 11:25:52 +02:00
Loïc Blot 8797a0aa4b chat.cpp fix wchar_t isspace -> iswspace & wrong isspace on an index (#5783) 2017-05-20 12:56:02 +02:00
red-001 00972d42d7 this might fix #5661, needs testing (#5775) 2017-05-20 10:48:44 +02:00
Loïc Blot ce9802266e Various code cleanup & little performance improvement on HTTP download (#5772)
* Disable or remove unused enum members/functions
* Tiny code style fixes
* Make some functions const
* Replace ClientMediaDownloader std::unordered_map with std::map
2017-05-20 08:15:56 +02:00
Loïc Blot f3fe62a0bf Fix various copy instead of const ref reported by cppcheck (#5615)
* Also remove InventoryList::peekItem unused function
* Fix some post increment to preincrement reported by cppcheck
2017-04-19 23:02:07 +02:00
Ekdohibs 14ef2b445a Add colored text (not only colored chat).
Add documentation, move files to a proper place and avoid memory leaks.
Make it work with most kind of texts, and allow backgrounds too.
2016-05-31 17:34:29 +02:00
TriBlade9 1d40385d4a Colored chat working as expected for both freetype and non-freetype builds. @nerzhul improvements * Add unit tests * Fix coding style * move guiChatConsole.hpp to client/ 2016-05-31 17:34:29 +02:00
Kahrl 2cdd9b4ab6 Chat: Keep scroll position constant in ChatBuffer::deleteOldest() 2016-05-08 02:51:23 +01:00
Ekdohibs 48939df9a5 Escape more strings: formspecs, item descriptions, infotexts...
Also, change the escape character to the more standard \x1b
Thus, it can be used in the future for translation or colored text,
for example.
2016-04-24 03:54:11 +10:00
ShadowNinja 93887043d9 Clean up Strfnd
Changes:
  * Fix indentation.
  * Pass strings by const reference.
  * Merge Strfnd and WStrfnd into one class instead of copying them.
  * Remove trailing spaces.
  * Fix variable names.
  * Move to util.
  * Other miscellaneous style fixes.
2016-03-19 21:27:57 -04:00
Ekdohibs 095f623fa7 Remove chat escape sequences from chat messages, for future colored chat. 2016-03-15 17:33:15 +01:00
ShadowNinja 430929e75a Add text selection and copying to console 2016-03-02 23:23:31 -05:00
Esteban I. Ruiz Moreno effa24737d Use the console instead of a dedicated window when pressing keymap_chat/cmd
keymap_console opens a full window for chat history browsing.
2016-03-02 23:23:31 -05:00
Nathaniel Olsen 3ae8b92be6 Remove unneccessary space for tab completion 2015-06-16 07:16:22 +02:00
Craig Robbins ced6d20295 For usages of assert() that are meant to persist in Release builds (when NDEBUG is defined), replace those usages with persistent alternatives 2015-03-07 22:41:47 +10:00
gregorycu 5b55deb1eb Suppress MSVC warning in chat.cpp 2015-01-25 16:09:23 +10:00
Kahrl daefd0ab36 Add paste command (Ctrl-V) in GUIChatConsole 2014-12-10 07:12:08 +01:00
Kahrl 206f076422 Fix typo in comment in chat.cpp 2014-09-14 15:37:27 +02:00
Kahrl 4e1f50035e Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02:00
PilzAdam b0e6806077 Fix nick completion 2013-04-05 02:31:58 +02:00
Ilya Zhuravlev 6a1670dbc3 Migrate to STL containers/algorithms. 2013-03-11 19:08:39 -04:00
Sfan5 6d0ea26c2d Update Copyright Years 2013-02-24 20:15:24 +01:00
PilzAdam 497ff1ecd6 Change Minetest-c55 to Minetest 2013-02-24 18:49:03 +01:00
Perttu Ahola d0ea6f9920 Properly and efficiently use split utility headers 2012-06-17 02:40:36 +03:00
Perttu Ahola 037b259197 Switch the license to be LGPLv2/later, with small parts still remaining as GPLv2/later, by agreement of major contributors 2012-06-05 18:54:07 +03:00
Kahrl 967f25461b Chat console, including a number of rebases and modifications.
Defaults modified from original: alpha=200, key=F10
2012-03-10 20:11:10 +02:00