ParamNode: switch to utf8, ToXML -> ToXMLString, test tweak, PCH tweak

This changes ParamNode to use UTF8 values internally (XMB files are UTF8
since cb9d0733ef).
This removes the need for a lot of conversions, speeding things up and
allows cleaning up the validator interface & a few other callsites.
ConstructJSVal could be a tad slower because of UTF8->16 conversions
within Spidermonkey; but the difference is unlikely to be noticeable in
practica.

Also:
- Changes `ToXML` to `ToXMLString` for clarity.
- Add a simple "op" test & show a particular behaviour of merge nodes
that I intend to change somewhat in D3830.
- Remove Component.h from simulation2 PCH - brought in too much.

Tested by: langbart
Differential Revision: https://code.wildfiregames.com/D3834
This was SVN commit r25228.
This commit is contained in:
wraitii
2021-04-11 09:23:10 +00:00
parent fcc6bbe797
commit 35ed55cfd6
22 changed files with 224 additions and 226 deletions
+1 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2020 Wildfire Games.
/* Copyright (C) 2021 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -23,7 +23,6 @@
// The simulation has many header files (component interfaces) which are quick to compile on their own
// but bring in a lot of headers indirectly. Adding these to the precompiled header
// cuts down compilation time by about half.
#include "simulation2/system/Component.h"
#include "simulation2/system/Interface.h"
#include "simulation2/system/InterfaceScripted.h"
#include "maths/FixedVector2D.h"