gecko/dom/bluetooth
Ehsan Akhgari 085494b95d Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo
This patch was mostly generated by running the following scripts on the codebase, with some
manual changes made afterwards:

# static_assert.sh
#!/bin/bash
# Command to convert an NSPR integer type to the equivalent standard integer type

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.cc" \
         -o -iname "*.mm" \) | \
    xargs -n 1 `dirname $0`/assert_replacer.py #sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_STATIC_ASSERT static_assert
hg rev --no-backup mfbt/Assertions.h \
                   media/webrtc/signaling/src/sipcc/core/includes/ccapi.h \
                   modules/libmar/src/mar_private.h \
                   modules/libmar/src/mar.h


# assert_replacer.py
#!/usr/bin/python

import sys
import re

pattern = re.compile(r"\bMOZ_STATIC_ASSERT\b")

def replaceInPlace(fname):
  print fname
  f = open(fname, "rw+")
  lines = f.readlines()
  for i in range(0, len(lines)):
    while True:
      index = re.search(pattern, lines[i])
      if index != None:
        index = index.start()
        lines[i] = lines[i][0:index] + "static_assert" + lines[i][index+len("MOZ_STATIC_ASSERT"):]
        for j in range(i + 1, len(lines)):
          if lines[j].find("                 ", index) == index:
            lines[j] = lines[j][0:index] + lines[j][index+4:]
          else:
            break
      else:
        break
  f.seek(0, 0)
  f.truncate()
  f.write("".join(lines))
  f.close()

argc = len(sys.argv)
for i in range(1, argc):
  replaceInPlace(sys.argv[i])

--HG--
extra : rebase_source : 4b4a4047d82f2c205b9fad8d56dfc3f1afc0b045
2013-07-18 13:59:53 -04:00
..
gonk Bug 877746 - Annotate ~230 methods with MOZ_OVERRIDE in /dom. r=Ms2ger 2013-06-05 12:15:48 -04:00
ipc Bug 842948 - Patch 6: Implement dictionaries, r=echou 2013-07-29 17:32:35 +08:00
linux Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo 2013-07-18 13:59:53 -04:00
BluetoothA2dpManager.cpp Bug 842934 - Patch 1: Add topic for hfp status changed and notify observers with device address, r=echou 2013-07-30 17:34:56 +08:00
BluetoothA2dpManager.h Bug 842934 - Patch 1: Add topic for hfp status changed and notify observers with device address, r=echou 2013-07-30 17:34:56 +08:00
BluetoothAdapter.cpp Bug 842948 - Patch 6: Implement dictionaries, r=echou 2013-07-29 17:32:35 +08:00
BluetoothAdapter.h Bug 877762 - GC: Post-barrier cycle collector participants - 7 Convert most JSObect to use Heap<T> (ex. XBL) r=bz 2013-06-18 11:00:38 +01:00
BluetoothCommon.h Bug 842934 - Patch 1: Add topic for hfp status changed and notify observers with device address, r=echou 2013-07-30 17:34:56 +08:00
BluetoothDevice.cpp Bug 877762 - GC: Post-barrier cycle collector participants - 7 Convert most JSObect to use Heap<T> (ex. XBL) r=bz 2013-06-18 11:00:38 +01:00
BluetoothDevice.h Bug 877762 - GC: Post-barrier cycle collector participants - 7 Convert most JSObect to use Heap<T> (ex. XBL) r=bz 2013-06-18 11:00:38 +01:00
BluetoothHfpManager.cpp Bug 842934 - Patch 1: Add topic for hfp status changed and notify observers with device address, r=echou 2013-07-30 17:34:56 +08:00
BluetoothHfpManager.h Bug 842934 - Patch 1: Add topic for hfp status changed and notify observers with device address, r=echou 2013-07-30 17:34:56 +08:00
BluetoothManager.cpp Bug 838146 part 6. Implement gamepad, bluetooth, time, audiochannel WebIDL APIs on Navigator. r=smaug, sr=sicking 2013-07-12 10:36:32 -04:00
BluetoothManager.h Bug 838146 part 6. Implement gamepad, bluetooth, time, audiochannel WebIDL APIs on Navigator. r=smaug, sr=sicking 2013-07-12 10:36:32 -04:00
BluetoothOppManager.cpp Bug 842948 - Patch 2: Handle control signal "PropertyChanged" and add IsConnected() in BluetoothProfileManagerBase, r=echou 2013-07-29 17:32:34 +08:00
BluetoothOppManager.h Bug 842948 - Patch 2: Handle control signal "PropertyChanged" and add IsConnected() in BluetoothProfileManagerBase, r=echou 2013-07-29 17:32:34 +08:00
BluetoothProfileManagerBase.h Bug 842948 - Patch 2: Handle control signal "PropertyChanged" and add IsConnected() in BluetoothProfileManagerBase, r=echou 2013-07-29 17:32:34 +08:00
BluetoothPropertyContainer.cpp Bug 834590 - Cache adapter path in BluetoothService, r=echou 2013-03-15 15:15:47 +08:00
BluetoothPropertyContainer.h
BluetoothReplyRunnable.cpp Bug 842186 - Replace use of jsval with JS::Value in h and cpp files in the dom/telephony dom/bluetooth directories. r=jwalden 2013-04-02 16:06:14 -07:00
BluetoothReplyRunnable.h Bug 877746 - Annotate ~230 methods with MOZ_OVERRIDE in /dom. r=Ms2ger 2013-06-05 12:15:48 -04:00
BluetoothService.cpp Backed out changeset ae8d72538dee (bug 897484) for b2g bustage 2013-07-26 12:34:25 +02:00
BluetoothService.h Bug 842948 - Patch 6: Implement dictionaries, r=echou 2013-07-29 17:32:35 +08:00
BluetoothSocket.cpp Bug 851046: Patch 8 - Add BluetoothSocket* as an argument of callback functions in BluetoothSocketObserver; r=mrbkap 2013-04-04 17:55:55 -07:00
BluetoothSocket.h Bug 851046: Patch 2 - New Class: BluetoothSocket; r=mrbkap 2013-04-04 17:52:12 -07:00
BluetoothSocketObserver.h Bug 851046: Patch 8 - Add BluetoothSocket* as an argument of callback functions in BluetoothSocketObserver; r=mrbkap 2013-04-04 17:55:55 -07:00
BluetoothTelephonyListener.cpp Bug 881142 - Part 3: Remove call state busy (bluetooth dom). r=gyeh 2013-07-15 08:54:07 -04:00
BluetoothTelephonyListener.h Bug 834160 - Part 5/7: fix Telephony. r=smaug, f=htsai 2013-03-06 17:53:23 +08:00
BluetoothUnixSocketConnector.cpp Bug 802686 - s/MOZ_NOT_REACHED/MOZ_CRASH/ in Gecko. r=(see below) 2013-06-28 18:38:30 -07:00
BluetoothUnixSocketConnector.h Bug 843868: Change sockaddr* to be a union of all possible sockaddr types; r=tzimmermann 2013-03-19 10:23:47 -07:00
BluetoothUtils.cpp Bug 896949 - JS_SetProperty APIs should take an immutable parameter r=waldo r=bz 2013-07-26 10:00:38 +01:00
BluetoothUtils.h Bug 896540 - GC: Convert JS_SetProperty* to take MutableHandleValue - browser changes r=bz 2013-07-25 13:57:00 +01:00
BluetoothUuid.cpp Bug 811946 - remove annoying compiler warnings and define a more structured interface for Bluetooth uuid, r=qdot 2012-11-27 14:12:19 +08:00
BluetoothUuid.h Bug 823803 - Add L2CAP/EL2CAP Socket support, r=qdot, r=gyeh 2013-04-12 18:45:37 +08:00
Makefile.in bug 887483 - remove a bunch of useless assignments to FORCE_STATIC_LIB implied by LIBXUL_LIBRARY=1 r=mshal 2013-07-11 11:06:34 -04:00
MediaMetaData.cpp Bug 897484 - followup: root newly added code to fix bustage on a CLOSED TREE. 2013-07-29 18:27:04 +02:00
MediaMetaData.h Bug 842948 - Patch 6: Implement dictionaries, r=echou 2013-07-29 17:32:35 +08:00
MediaPlayStatus.cpp Bug 897484 - followup: root newly added code to fix bustage on a CLOSED TREE. 2013-07-29 18:27:04 +02:00
MediaPlayStatus.h Bug 842948 - Patch 6: Implement dictionaries, r=echou 2013-07-29 17:32:35 +08:00
moz.build Bug 842948 - Patch 6: Implement dictionaries, r=echou 2013-07-29 17:32:35 +08:00
nsIDOMBluetoothAdapter.idl Bug 842948 - Patch 1: Implement API for AVRCP 1.3, r=echou, sr=mrbkap 2013-07-29 17:32:34 +08:00
nsIDOMBluetoothDevice.idl Bug 853158 - Update the uuid of nsIDOMEventTarget and subclasses. 2013-03-30 10:45:37 +01:00
nsIDOMBluetoothDeviceEvent.idl Bug 823107 - Make nsIDOMEvent::SetTrusted return void; r=smaug 2012-12-22 09:18:08 +01:00
nsIDOMBluetoothManager.idl Bug 853158 - Update the uuid of nsIDOMEventTarget and subclasses. 2013-03-30 10:45:37 +01:00
ObexBase.cpp Bug 823427 - Remove unnecessary buffer in ObexBase.cpp, r=gyeh, r=dholbert 2012-12-21 19:03:42 +08:00
ObexBase.h Bug 891202 - [Bluetooth][OPP cleanup] Unify obex data sending function, r=echou 2013-07-10 11:20:13 +08:00