Commit Graph

33 Commits (b1ac208249caf6b223ef397f550a1caebbfa7e76)

Author SHA1 Message Date
Sven Eberhardt b1ac208249 Qt Editor: Add "File->New" menu entry 2016-03-22 23:08:05 -04:00
Nicolas Hake 8fc57b69c3 Don't ZeroMem non-POD types
Using memset to initialize non-POD types doesn't work. Or rather, it may
work right now, but will fail when somebody adds a member that relies on
its constructor doing something (like for example any STL container).
Either way it's undefined behavior and needs to go. Furthermore, using
it to reinitialize an object also prevents any dtors from doing their
work when needed.

A new helper function InplaceReconstruct will take an object of nothrow-
default-constructible type, and call the dtor to properly clean up
before placement-new reconstructing the object in the same location.
This is still bad design, but unfortunately removing the Default/Clear
functions from every object currently using them is a herculean task.
2015-11-14 16:43:19 +01:00
Nicolas Hake 6a11e3e811 Stop checking for rvalue ref support
We already require support for std::unique_ptr, which itself requires
support for rvalue references. As such, we know we can use rvalue
references, and thus don't have to keep carrying dead code around.
2015-09-20 13:27:14 +02:00
Nicolas Hake d1313f622f Drop hack that allowed taking a reference to a temporary value
This has never been legal C++, and the compilers where it was necessary
are no longer supported.
2015-09-20 13:27:13 +02:00
Nicolas Hake 5562b09dc4 Remove a lot of disabled legacy code, round 2
Maybe at some point we'll be rid of all the commented-out code that
nobody has looked at in years.
2015-03-25 20:02:53 +01:00
Günther Brammer 5bcedb5bbf Remove some redundant #includes 2015-01-25 18:53:48 +01:00
Nicolas Hake 2ef2c637a7 Remove several instances of disabled legacy code 2015-01-18 22:59:45 +01:00
Günther Brammer 88e5608298 Improve grammar in comment 2014-04-19 19:02:22 +02:00
Nicolas Hake e0dc30c59a Update copyright notices
As discussed in http://forum.openclonk.org/topic_show.pl?tid=2917, I
have merged all copyright notices into a single file and referenced that
merged file from each source file.

For the updated source files, the timeline has been split into three
parts:
 1. Pre-RWD code (before 2001)
 2. RWD code (2001 through 2009)
 3. OpenClonk code (2009 and later)
All pre-RWD copyright notices have been left intact, as have RWD-era
copyright notices where the file did not have a RedWolf design copyright
notice but only individual author ones. All copyright notices of the
OpenClonk era have been replaced by a single notice ranging from the
first recorded year to the current year (2013). Mape code did not get a
OpenClonk Team copyright notice because it is somewhat separate from the
main OpenClonk codebase and has only been touched by Armin Burgmeier.
2013-12-23 13:03:19 +01:00
Sven Eberhardt e22049c245 Fix writing of Record.log 2011-10-09 20:11:39 +02:00
Günther Brammer 9bc61db360 copyright notices update 2011 2011-09-01 16:58:52 +02:00
Günther Brammer 21e28a4689 Script: Use Unicode instead of Byte strings
Internally, strings are UTF-8 as before, but GetChar returns an
Unicode code point instead of a byte from the UTF-8 encoded string,
and Format("%c") takes an Unicode code point as well.
2011-03-10 00:26:31 +01:00
Günther Brammer 702dc65b83 win32: Add helper functions to convert UTF-8 to UTF-16
They mostly add automatic memory management to MultiByteToWideChar.
2011-04-02 16:48:54 +02:00
Günther Brammer 2133ed2cd8 Add missing move constructors to StdCopy*Buf 2011-04-02 18:09:46 +02:00
Günther Brammer 38ee07e7fc Remove unused third StdStdBuf::ReplaceChar parameter
C4InputValidation tried to use it but obviously couldn't. Validation of
absolute windows filepaths remains as broken as before.
2011-03-28 18:27:01 +02:00
Günther Brammer 62bcf4d5c2 win32: move StdStrBuf(const wchar_t*) to StdBuf.cpp to avoid winnls.h 2011-03-12 15:26:35 +01:00
Günther Brammer 01e9dce9ce Store C4ComponentHost filenames in StdCopyStrBufs 2011-03-05 02:45:27 +01:00
Nicolas Hake 0800b3a209 StdBuf: change member order to silence g++ warnings 2011-03-04 00:02:43 +01:00
Günther Brammer be342d4a51 copyright notices update 2010
This time with more manual checking and using git blame -M -C, so that
a few cases of copied code get a copyright notice corresponding to
their initial introduction.
2010-12-23 01:01:24 +01:00
Günther Brammer c16102ec9b Shrink StdBuf from 24 to 16 bytes and C4PropList from 56 to 48 on amd64
There's no need for Buffers which exceed 4 GB size in Clonk. C4PropList
just had some padding for alignment.
2010-12-06 19:04:32 +01:00
Günther Brammer 9494b90fe8 win32: Copy, paste and type arbitrary Unicode characters 2010-11-04 02:08:02 +01:00
Günther Brammer e8be520da5 Make StdBuf compile with g++ 4.5
This time without falling into the trap of ommitting the Foo(const Foo&) constructor.
2010-04-27 01:20:30 +02:00
Nicolas Hake 00e1298927 Backed out changeset 9384f37fca80
Re-breaking g++ 4.5, but at the same time un-breaking g++ 4.3, as well
as MSVC 2010 (Beta 2, at least). Sorry, g++ 4.5 users.

This wouldn't have happened with std::string.
2010-04-26 16:32:10 +02:00
Günther Brammer e852c15944 Make StdBuf compile with g++ 4.5 2010-04-25 14:29:01 +02:00
Nicolas Hake 5dc0d3b4cb Reduce value truncation warnings 2010-04-20 18:20:24 +02:00
Benjamin Herr 5cdbd907c8 Make some src/lib headers compile on their own 2010-03-29 01:58:02 +02:00
Benjamin Herr 27287b981f Reformat everything according to style guidelines
as per http://forum.openclonk.org/topic_show.pl?tid=208
and http://wiki.openclonk.org/w/Style_Guidelines
via astyle
  --brackets=break
  --indent=tab=2
  --keep-one-line-statements
  --keep-one-line-blocks
  --indent-namespaces
  --convert-tabs
  --recursive
  --exclude=zlib
  --exclude=tinyxml
  src/\*.h src/*.cpp
2010-03-28 19:58:21 +02:00
Günther Brammer b4e37b070b Change all indentation with spaces to use tabs instead
This is a whitespace-only patch. Hopefully, it'll only affect rarely-changed
parts of the engine, since all regularly maintained pieces should already
use tabs.
2010-03-27 17:05:02 +01:00
Günther Brammer e30ff99d6a Remove all superflous #include <Standard.h>
Standard.h is included by C4Include.h, and every file includes that.
2010-03-04 22:11:12 +01:00
Armin Burgmeier fb95c3af2e Merge mesh into default 2010-01-04 01:10:31 +01:00
mizipzor a53dae0c1b Fixed compilation in MSVC2010 2009-11-25 19:38:54 +01:00
Armin Burgmeier 4fa029df2c Merged default into mesh 2009-08-27 21:35:55 -04:00
Günther Brammer 572d00c32e Move all source files
This might make stuff easier to find.
2009-08-10 17:59:18 +02:00