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
BluetoothPropertyContainer.h
BluetoothReplyRunnable.cpp
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
BluetoothSocket.h
BluetoothSocketObserver.h
BluetoothTelephonyListener.cpp Bug 881142 - Part 3: Remove call state busy (bluetooth dom). r=gyeh 2013-07-15 08:54:07 -04:00
BluetoothTelephonyListener.h
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
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
BluetoothUuid.h
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
nsIDOMBluetoothDeviceEvent.idl
nsIDOMBluetoothManager.idl
ObexBase.cpp
ObexBase.h Bug 891202 - [Bluetooth][OPP cleanup] Unify obex data sending function, r=echou 2013-07-10 11:20:13 +08:00