Commit graph

11 commits

Author SHA1 Message Date
MatmaRex
df8ec1e216 No spaces after (casts)
Also removed some unnecessary ones. I think I've caught them all.

The spaceless version already appears in core ~300 times (after
accounting for false positives when grepping). Some consistency would
be nice.

Change-Id: I607655b5f4366e66dc78730d5fd2f57ed8776cae
2013-09-04 20:05:43 +02:00
Tim Starling
241ec55610 UIDGenerator: better support for 32-bit machines
Replace one exception with another that is less likely. Integer
multiplication is exact up to the limit of the double precision
mantissa size, and wfBaseConvert() will work up to any size of string.
So it's not necessary to require bcmath/gmp to be installed. The modulo
operation is equivalent to truncation of the binary form.

Perhaps mantissa sizes will be extended before the year 144680, made
possible by improved computing hardware. The exception message should be
altered when such hardware becomes available.

Change-Id: I8116dac1958b5dbef977d3900973bf13be3d9d17
2013-04-19 08:34:20 +10:00
umherirrender
15abcf71ca Added/Removed spaces around string concatenation
And added/removed spaces around some other tokens,
like +, -, *, /, <, >, =, !

Fixed windows newline style

Change-Id: I0b9c8c408f3f6bfc0d685a074d7ec468fb848fc8
2013-04-13 13:36:24 +02:00
Yuri Astrakhan
9506e3d812 Spellchecked /includes directory
* Ran spell-checker over code comments in /includes/
* A few spellchecking fixes for wfDebug() calls

Found one very strange (NOOP?) line in Linker.php - see "TODO: BUG?"

Change-Id: Ibb86b51073b980eda9ecce2cf0b8dd33f058adbf
2013-03-13 03:42:41 -04:00
Tyler Anthony Romeo
4dcc7961df Fixed @param tags to conform with Doxygen format.
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.

Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
2013-03-11 13:15:01 -04:00
Aaron Schulz
7ae0cc3751 Break long line.
Change-Id: I1422eb3eee369c18858f31a66df1e3904e098958
2013-02-12 09:34:15 -08:00
Tyler Anthony Romeo
d2ef30b882 Use wfShellExec() in UIDGenerator and style fixes.
Replaced backtick commands with wfShellExec() so that
the proper shell timeouts are applied. Also made some
minor style changes (added spaces after casting, got
rid of vertical alignment).

Change-Id: I9a8e9cb689279881f7bdea281c0107d613c3a7a8
2013-02-07 15:11:22 -05:00
Aaron Schulz
e53902e550 Added UIDGenerator class for getting statistically unique IDs.
* This is useful for making IDs for object in partitioned stores.
* The "UID" functions are not called "UUIDs" since they don't follow RFC4122.
  This is for performance reasons since the ID fields tend to be indexed.
* This includes newUUIDv4(), which is compliant with the aforementioned RFC.

This reverts commit 86f895bfe3.

Change-Id: I989626dfb7976d17f5931a34fe040f41cf14dfe3
2013-02-07 17:38:12 +00:00
Antoine Musso
86f895bfe3 Revert UIDGenerator commits.
Changes seemed to be merged without anyone really looking at it
and the authorship in git is wrong as well. All related changes
can later be batched as one commit.

Following commit / change are reverted:

 - 7ac3edd https://gerrit.wikimedia.org/r/36803
 - 036d03b https://gerrit.wikimedia.org/r/36813
 - 2b168e3 https://gerrit.wikimedia.org/r/36812
 - 6030d92 https://gerrit.wikimedia.org/r/36801

See wikitech-l thread
http://lists.wikimedia.org/pipermail/wikitech-l/2012-December/064801.html

Change-Id: Ie39fde2ee4121372b6d790943f306e56fbacc2b5
2012-12-05 09:52:20 -08:00
Aaron Schulz
7ac3eddf19 Cleaned up UIDGenerator docs a bit.
Change-Id: I32ca575ca4d7b446b4a27b91d1e8aaa7173c575b
2012-12-04 20:35:09 +00:00
Patrick Reilly
6030d92b53 Class for getting statistically unique IDs NOT a RFC4122 standard string representation
Change-Id: Ia4133b65afb63931b5f887feb247dac1b1e42360
2012-12-04 10:58:29 -08:00