Page MenuHomeWildfire Games

Stop copying the territory grid when recomputing the texture.
ClosedPublic

Authored by leper on Jul 12 2017, 11:47 PM.

Details

Reviewers
elexis
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Owners Package(Owns No Changed Paths)
Commits
rP19936: Stop copying the territory grid when recomputing the texture.
Summary

Also some small cleanup.

Test Plan

Check that we use a ref now.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

leper created this revision.Jul 12 2017, 11:47 PM
Owners added a subscriber: Restricted Owners Package.Jul 12 2017, 11:47 PM
Vulcan added a subscriber: Vulcan.Jul 13 2017, 2:07 AM

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...

http://jw:8080/job/phabricator/1738/ for more details.

Executing section Default...
Executing section Source...
Executing section JS...
Executing section XML GUI...
Executing section Python...
Executing section Perl...

http://jw:8080/job/phabricator_lint/311/ for more details.

elexis added a subscriber: elexis.

Ack if territories is inlined.

The size ctor was introduced in C++11 which is our currently minimum requirement according to https://trac.wildfiregames.com/wiki/CppSupport
http://en.cppreference.com/w/cpp/container/vector/vector

elexis accepted this revision.Jul 13 2017, 4:19 PM
This revision is now accepted and ready to land.Jul 13 2017, 4:19 PM
In D741#29218, @elexis wrote:

Ack if territories is inlined.

That would slightly hide the fact that that line just missed a &, but fine by me.

In D741#29285, @leper wrote:
In D741#29218, @elexis wrote:

Ack if territories is inlined.

That would slightly hide the fact that that line just missed a &, but fine by me.

Actually I do somewhat like that this shows what the issue fixed is, as opposed to inlining it.

Don't see what we need that variable for when the commit message contains that information. The important part is fixing the wasteful copy either way.

This revision was automatically updated to reflect the committed changes.