summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/ac_u.cpp2
-rw-r--r--src/core/hle/service/act_u.cpp2
-rw-r--r--src/core/hle/service/am_app.cpp2
-rw-r--r--src/core/hle/service/am_net.cpp2
-rw-r--r--src/core/hle/service/am_sys.cpp2
-rw-r--r--src/core/hle/service/apt_a.cpp2
-rw-r--r--src/core/hle/service/apt_s.cpp2
-rw-r--r--src/core/hle/service/apt_u.cpp2
-rw-r--r--src/core/hle/service/boss_p.cpp2
-rw-r--r--src/core/hle/service/boss_u.cpp2
-rw-r--r--src/core/hle/service/cam_u.cpp2
-rw-r--r--src/core/hle/service/cecd_s.cpp2
-rw-r--r--src/core/hle/service/cecd_u.cpp2
-rw-r--r--src/core/hle/service/cfg/cfg_i.cpp2
-rw-r--r--src/core/hle/service/cfg/cfg_s.cpp2
-rw-r--r--src/core/hle/service/cfg/cfg_u.cpp2
-rw-r--r--src/core/hle/service/csnd_snd.cpp2
-rw-r--r--src/core/hle/service/dsp_dsp.cpp2
-rw-r--r--src/core/hle/service/err_f.cpp2
-rw-r--r--src/core/hle/service/frd_a.cpp2
-rw-r--r--src/core/hle/service/frd_u.cpp2
-rw-r--r--src/core/hle/service/fs/fs_user.cpp2
-rw-r--r--src/core/hle/service/gsp_gpu.cpp2
-rw-r--r--src/core/hle/service/gsp_lcd.cpp2
-rw-r--r--src/core/hle/service/hid/hid_spvr.cpp2
-rw-r--r--src/core/hle/service/hid/hid_user.cpp2
-rw-r--r--src/core/hle/service/http_c.cpp2
-rw-r--r--src/core/hle/service/ir_rst.cpp2
-rw-r--r--src/core/hle/service/ir_u.cpp2
-rw-r--r--src/core/hle/service/ldr_ro.cpp2
-rw-r--r--src/core/hle/service/mic_u.cpp2
-rw-r--r--src/core/hle/service/ndm_u.cpp2
-rw-r--r--src/core/hle/service/news_s.cpp2
-rw-r--r--src/core/hle/service/news_u.cpp2
-rw-r--r--src/core/hle/service/nim_aoc.cpp2
-rw-r--r--src/core/hle/service/ns_s.cpp2
-rw-r--r--src/core/hle/service/nwm_uds.cpp2
-rw-r--r--src/core/hle/service/pm_app.cpp2
-rw-r--r--src/core/hle/service/ptm_play.cpp2
-rw-r--r--src/core/hle/service/ptm_sysm.cpp2
-rw-r--r--src/core/hle/service/ptm_u.cpp2
-rw-r--r--src/core/hle/service/service.h31
-rw-r--r--src/core/hle/service/soc_u.cpp2
-rw-r--r--src/core/hle/service/srv.cpp2
-rw-r--r--src/core/hle/service/ssl_c.cpp2
-rw-r--r--src/core/hle/service/y2r_u.cpp2
46 files changed, 54 insertions, 67 deletions
diff --git a/src/core/hle/service/ac_u.cpp b/src/core/hle/service/ac_u.cpp
index 20a3fa2e5..53d920de1 100644
--- a/src/core/hle/service/ac_u.cpp
+++ b/src/core/hle/service/ac_u.cpp
@@ -53,7 +53,7 @@ const Interface::FunctionInfo FunctionTable[] = {
53// Interface class 53// Interface class
54 54
55Interface::Interface() { 55Interface::Interface() {
56 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 56 Register(FunctionTable);
57} 57}
58 58
59} // namespace 59} // namespace
diff --git a/src/core/hle/service/act_u.cpp b/src/core/hle/service/act_u.cpp
index 10870f14b..4ea7a9fb2 100644
--- a/src/core/hle/service/act_u.cpp
+++ b/src/core/hle/service/act_u.cpp
@@ -18,7 +18,7 @@ namespace ACT_U {
18// Interface class 18// Interface class
19 19
20Interface::Interface() { 20Interface::Interface() {
21 //Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 21 //Register(FunctionTable);
22} 22}
23 23
24} // namespace 24} // namespace
diff --git a/src/core/hle/service/am_app.cpp b/src/core/hle/service/am_app.cpp
index 0b396b6d3..df10db87f 100644
--- a/src/core/hle/service/am_app.cpp
+++ b/src/core/hle/service/am_app.cpp
@@ -18,7 +18,7 @@ namespace AM_APP {
18// Interface class 18// Interface class
19 19
20Interface::Interface() { 20Interface::Interface() {
21 //Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 21 //Register(FunctionTable);
22} 22}
23 23
24} // namespace 24} // namespace
diff --git a/src/core/hle/service/am_net.cpp b/src/core/hle/service/am_net.cpp
index 112844e5b..c74012d9d 100644
--- a/src/core/hle/service/am_net.cpp
+++ b/src/core/hle/service/am_net.cpp
@@ -38,7 +38,7 @@ const Interface::FunctionInfo FunctionTable[] = {
38// Interface class 38// Interface class
39 39
40Interface::Interface() { 40Interface::Interface() {
41 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 41 Register(FunctionTable);
42} 42}
43 43
44} // namespace 44} // namespace
diff --git a/src/core/hle/service/am_sys.cpp b/src/core/hle/service/am_sys.cpp
index b63c8c087..c5df8abda 100644
--- a/src/core/hle/service/am_sys.cpp
+++ b/src/core/hle/service/am_sys.cpp
@@ -18,7 +18,7 @@ namespace AM_SYS {
18// Interface class 18// Interface class
19 19
20Interface::Interface() { 20Interface::Interface() {
21 //Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 21 //Register(FunctionTable);
22} 22}
23 23
24} // namespace 24} // namespace
diff --git a/src/core/hle/service/apt_a.cpp b/src/core/hle/service/apt_a.cpp
index 42f2879c1..e1dd2a5fb 100644
--- a/src/core/hle/service/apt_a.cpp
+++ b/src/core/hle/service/apt_a.cpp
@@ -39,7 +39,7 @@ const Interface::FunctionInfo FunctionTable[] = {
39// Interface class 39// Interface class
40 40
41Interface::Interface() { 41Interface::Interface() {
42 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 42 Register(FunctionTable);
43} 43}
44 44
45} // namespace 45} // namespace
diff --git a/src/core/hle/service/apt_s.cpp b/src/core/hle/service/apt_s.cpp
index 7ad428ee7..686335428 100644
--- a/src/core/hle/service/apt_s.cpp
+++ b/src/core/hle/service/apt_s.cpp
@@ -117,7 +117,7 @@ const Interface::FunctionInfo FunctionTable[] = {
117// Interface class 117// Interface class
118 118
119Interface::Interface() { 119Interface::Interface() {
120 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 120 Register(FunctionTable);
121} 121}
122 122
123} // namespace 123} // namespace
diff --git a/src/core/hle/service/apt_u.cpp b/src/core/hle/service/apt_u.cpp
index 4c3f621d0..1e6f1f78c 100644
--- a/src/core/hle/service/apt_u.cpp
+++ b/src/core/hle/service/apt_u.cpp
@@ -520,7 +520,7 @@ Interface::Interface() {
520 520
521 lock = Kernel::Mutex::Create(false, "APT_U:Lock").MoveFrom(); 521 lock = Kernel::Mutex::Create(false, "APT_U:Lock").MoveFrom();
522 522
523 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 523 Register(FunctionTable);
524} 524}
525 525
526} // namespace 526} // namespace
diff --git a/src/core/hle/service/boss_p.cpp b/src/core/hle/service/boss_p.cpp
index f245a38e9..b3aa6acee 100644
--- a/src/core/hle/service/boss_p.cpp
+++ b/src/core/hle/service/boss_p.cpp
@@ -18,7 +18,7 @@ namespace BOSS_P {
18// Interface class 18// Interface class
19 19
20Interface::Interface() { 20Interface::Interface() {
21 //Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 21 //Register(FunctionTable);
22} 22}
23 23
24} // namespace 24} // namespace
diff --git a/src/core/hle/service/boss_u.cpp b/src/core/hle/service/boss_u.cpp
index 1820ea7ad..50bb5d426 100644
--- a/src/core/hle/service/boss_u.cpp
+++ b/src/core/hle/service/boss_u.cpp
@@ -19,7 +19,7 @@ const Interface::FunctionInfo FunctionTable[] = {
19// Interface class 19// Interface class
20 20
21Interface::Interface() { 21Interface::Interface() {
22 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 22 Register(FunctionTable);
23} 23}
24 24
25} // namespace 25} // namespace
diff --git a/src/core/hle/service/cam_u.cpp b/src/core/hle/service/cam_u.cpp
index 549095339..cf3b27664 100644
--- a/src/core/hle/service/cam_u.cpp
+++ b/src/core/hle/service/cam_u.cpp
@@ -18,7 +18,7 @@ namespace CAM_U {
18// Interface class 18// Interface class
19 19
20Interface::Interface() { 20Interface::Interface() {
21 //Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 21 //Register(FunctionTable);
22} 22}
23 23
24} // namespace 24} // namespace
diff --git a/src/core/hle/service/cecd_s.cpp b/src/core/hle/service/cecd_s.cpp
index 9c4992f13..2c707baff 100644
--- a/src/core/hle/service/cecd_s.cpp
+++ b/src/core/hle/service/cecd_s.cpp
@@ -18,7 +18,7 @@ namespace CECD_S {
18// Interface class 18// Interface class
19 19
20Interface::Interface() { 20Interface::Interface() {
21 //Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 21 //Register(FunctionTable);
22} 22}
23 23
24} // namespace 24} // namespace
diff --git a/src/core/hle/service/cecd_u.cpp b/src/core/hle/service/cecd_u.cpp
index b7655ef0b..b7ea3a186 100644
--- a/src/core/hle/service/cecd_u.cpp
+++ b/src/core/hle/service/cecd_u.cpp
@@ -18,7 +18,7 @@ namespace CECD_U {
18// Interface class 18// Interface class
19 19
20Interface::Interface() { 20Interface::Interface() {
21 //Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 21 //Register(FunctionTable);
22} 22}
23 23
24} // namespace 24} // namespace
diff --git a/src/core/hle/service/cfg/cfg_i.cpp b/src/core/hle/service/cfg/cfg_i.cpp
index 7c1ee8ac3..555b7884a 100644
--- a/src/core/hle/service/cfg/cfg_i.cpp
+++ b/src/core/hle/service/cfg/cfg_i.cpp
@@ -104,7 +104,7 @@ const Interface::FunctionInfo FunctionTable[] = {
104// Interface class 104// Interface class
105 105
106Interface::Interface() { 106Interface::Interface() {
107 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 107 Register(FunctionTable);
108} 108}
109 109
110} // namespace 110} // namespace
diff --git a/src/core/hle/service/cfg/cfg_s.cpp b/src/core/hle/service/cfg/cfg_s.cpp
index cf4e82152..2170894d6 100644
--- a/src/core/hle/service/cfg/cfg_s.cpp
+++ b/src/core/hle/service/cfg/cfg_s.cpp
@@ -92,7 +92,7 @@ const Interface::FunctionInfo FunctionTable[] = {
92// Interface class 92// Interface class
93 93
94Interface::Interface() { 94Interface::Interface() {
95 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 95 Register(FunctionTable);
96} 96}
97 97
98} // namespace 98} // namespace
diff --git a/src/core/hle/service/cfg/cfg_u.cpp b/src/core/hle/service/cfg/cfg_u.cpp
index 835620909..1da9f59f6 100644
--- a/src/core/hle/service/cfg/cfg_u.cpp
+++ b/src/core/hle/service/cfg/cfg_u.cpp
@@ -186,7 +186,7 @@ const Interface::FunctionInfo FunctionTable[] = {
186// Interface class 186// Interface class
187 187
188Interface::Interface() { 188Interface::Interface() {
189 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 189 Register(FunctionTable);
190} 190}
191 191
192} // namespace 192} // namespace
diff --git a/src/core/hle/service/csnd_snd.cpp b/src/core/hle/service/csnd_snd.cpp
index 3a557efe1..39b00982c 100644
--- a/src/core/hle/service/csnd_snd.cpp
+++ b/src/core/hle/service/csnd_snd.cpp
@@ -29,7 +29,7 @@ const Interface::FunctionInfo FunctionTable[] = {
29// Interface class 29// Interface class
30 30
31Interface::Interface() { 31Interface::Interface() {
32 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 32 Register(FunctionTable);
33} 33}
34 34
35} // namespace 35} // namespace
diff --git a/src/core/hle/service/dsp_dsp.cpp b/src/core/hle/service/dsp_dsp.cpp
index 9a38be393..7a18c1747 100644
--- a/src/core/hle/service/dsp_dsp.cpp
+++ b/src/core/hle/service/dsp_dsp.cpp
@@ -206,7 +206,7 @@ Interface::Interface() {
206 interrupt_event = nullptr; 206 interrupt_event = nullptr;
207 read_pipe_count = 0; 207 read_pipe_count = 0;
208 208
209 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 209 Register(FunctionTable);
210} 210}
211 211
212} // namespace 212} // namespace
diff --git a/src/core/hle/service/err_f.cpp b/src/core/hle/service/err_f.cpp
index 8c900eabc..962de2170 100644
--- a/src/core/hle/service/err_f.cpp
+++ b/src/core/hle/service/err_f.cpp
@@ -19,7 +19,7 @@ const Interface::FunctionInfo FunctionTable[] = {
19// Interface class 19// Interface class
20 20
21Interface::Interface() { 21Interface::Interface() {
22 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 22 Register(FunctionTable);
23} 23}
24 24
25} // namespace 25} // namespace
diff --git a/src/core/hle/service/frd_a.cpp b/src/core/hle/service/frd_a.cpp
index 53edc2cd8..79140a756 100644
--- a/src/core/hle/service/frd_a.cpp
+++ b/src/core/hle/service/frd_a.cpp
@@ -18,7 +18,7 @@ namespace FRD_A {
18// Interface class 18// Interface class
19 19
20Interface::Interface() { 20Interface::Interface() {
21 //Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 21 //Register(FunctionTable);
22} 22}
23 23
24} // namespace 24} // namespace
diff --git a/src/core/hle/service/frd_u.cpp b/src/core/hle/service/frd_u.cpp
index 021186e57..59faca77a 100644
--- a/src/core/hle/service/frd_u.cpp
+++ b/src/core/hle/service/frd_u.cpp
@@ -27,7 +27,7 @@ const Interface::FunctionInfo FunctionTable[] = {
27// Interface class 27// Interface class
28 28
29Interface::Interface() { 29Interface::Interface() {
30 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 30 Register(FunctionTable);
31} 31}
32 32
33} // namespace 33} // namespace
diff --git a/src/core/hle/service/fs/fs_user.cpp b/src/core/hle/service/fs/fs_user.cpp
index 9cb7d809a..94a3a31c8 100644
--- a/src/core/hle/service/fs/fs_user.cpp
+++ b/src/core/hle/service/fs/fs_user.cpp
@@ -591,7 +591,7 @@ const FSUserInterface::FunctionInfo FunctionTable[] = {
591// Interface class 591// Interface class
592 592
593FSUserInterface::FSUserInterface() { 593FSUserInterface::FSUserInterface() {
594 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 594 Register(FunctionTable);
595} 595}
596 596
597} // namespace FS 597} // namespace FS
diff --git a/src/core/hle/service/gsp_gpu.cpp b/src/core/hle/service/gsp_gpu.cpp
index 5b91f17d2..936203318 100644
--- a/src/core/hle/service/gsp_gpu.cpp
+++ b/src/core/hle/service/gsp_gpu.cpp
@@ -389,7 +389,7 @@ const Interface::FunctionInfo FunctionTable[] = {
389// Interface class 389// Interface class
390 390
391Interface::Interface() { 391Interface::Interface() {
392 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 392 Register(FunctionTable);
393 393
394 g_interrupt_event = 0; 394 g_interrupt_event = 0;
395 g_shared_memory = 0; 395 g_shared_memory = 0;
diff --git a/src/core/hle/service/gsp_lcd.cpp b/src/core/hle/service/gsp_lcd.cpp
index 6213472ff..d63fa1ee2 100644
--- a/src/core/hle/service/gsp_lcd.cpp
+++ b/src/core/hle/service/gsp_lcd.cpp
@@ -20,7 +20,7 @@ namespace GSP_LCD {
20// Interface class 20// Interface class
21 21
22Interface::Interface() { 22Interface::Interface() {
23 //Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 23 //Register(FunctionTable);
24} 24}
25 25
26} // namespace 26} // namespace
diff --git a/src/core/hle/service/hid/hid_spvr.cpp b/src/core/hle/service/hid/hid_spvr.cpp
index 76c40b659..054aa8b59 100644
--- a/src/core/hle/service/hid/hid_spvr.cpp
+++ b/src/core/hle/service/hid/hid_spvr.cpp
@@ -32,7 +32,7 @@ const Interface::FunctionInfo FunctionTable[] = {
32// Interface class 32// Interface class
33 33
34Interface::Interface() { 34Interface::Interface() {
35 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 35 Register(FunctionTable);
36} 36}
37 37
38} // namespace 38} // namespace
diff --git a/src/core/hle/service/hid/hid_user.cpp b/src/core/hle/service/hid/hid_user.cpp
index 5444aa5ee..68edafebb 100644
--- a/src/core/hle/service/hid/hid_user.cpp
+++ b/src/core/hle/service/hid/hid_user.cpp
@@ -72,7 +72,7 @@ const Interface::FunctionInfo FunctionTable[] = {
72// Interface class 72// Interface class
73 73
74Interface::Interface() { 74Interface::Interface() {
75 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 75 Register(FunctionTable);
76} 76}
77 77
78} // namespace 78} // namespace
diff --git a/src/core/hle/service/http_c.cpp b/src/core/hle/service/http_c.cpp
index d0bff552f..6595ca572 100644
--- a/src/core/hle/service/http_c.cpp
+++ b/src/core/hle/service/http_c.cpp
@@ -58,7 +58,7 @@ const Interface::FunctionInfo FunctionTable[] = {
58// Interface class 58// Interface class
59 59
60Interface::Interface() { 60Interface::Interface() {
61 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 61 Register(FunctionTable);
62} 62}
63 63
64} // namespace 64} // namespace
diff --git a/src/core/hle/service/ir_rst.cpp b/src/core/hle/service/ir_rst.cpp
index d49bd5335..31da8e160 100644
--- a/src/core/hle/service/ir_rst.cpp
+++ b/src/core/hle/service/ir_rst.cpp
@@ -22,7 +22,7 @@ const Interface::FunctionInfo FunctionTable[] = {
22// Interface class 22// Interface class
23 23
24Interface::Interface() { 24Interface::Interface() {
25 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 25 Register(FunctionTable);
26} 26}
27 27
28} // namespace 28} // namespace
diff --git a/src/core/hle/service/ir_u.cpp b/src/core/hle/service/ir_u.cpp
index da6f38e41..7fa233048 100644
--- a/src/core/hle/service/ir_u.cpp
+++ b/src/core/hle/service/ir_u.cpp
@@ -36,7 +36,7 @@ const Interface::FunctionInfo FunctionTable[] = {
36// Interface class 36// Interface class
37 37
38Interface::Interface() { 38Interface::Interface() {
39 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 39 Register(FunctionTable);
40} 40}
41 41
42} // namespace 42} // namespace
diff --git a/src/core/hle/service/ldr_ro.cpp b/src/core/hle/service/ldr_ro.cpp
index 7d6e2e8e8..459717fff 100644
--- a/src/core/hle/service/ldr_ro.cpp
+++ b/src/core/hle/service/ldr_ro.cpp
@@ -27,7 +27,7 @@ const Interface::FunctionInfo FunctionTable[] = {
27// Interface class 27// Interface class
28 28
29Interface::Interface() { 29Interface::Interface() {
30 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 30 Register(FunctionTable);
31} 31}
32 32
33} // namespace 33} // namespace
diff --git a/src/core/hle/service/mic_u.cpp b/src/core/hle/service/mic_u.cpp
index 82bce9180..af967b5b6 100644
--- a/src/core/hle/service/mic_u.cpp
+++ b/src/core/hle/service/mic_u.cpp
@@ -34,7 +34,7 @@ const Interface::FunctionInfo FunctionTable[] = {
34// Interface class 34// Interface class
35 35
36Interface::Interface() { 36Interface::Interface() {
37 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 37 Register(FunctionTable);
38} 38}
39 39
40} // namespace 40} // namespace
diff --git a/src/core/hle/service/ndm_u.cpp b/src/core/hle/service/ndm_u.cpp
index 0f03de6ae..df3c97193 100644
--- a/src/core/hle/service/ndm_u.cpp
+++ b/src/core/hle/service/ndm_u.cpp
@@ -24,7 +24,7 @@ const Interface::FunctionInfo FunctionTable[] = {
24// Interface class 24// Interface class
25 25
26Interface::Interface() { 26Interface::Interface() {
27 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 27 Register(FunctionTable);
28} 28}
29 29
30} // namespace 30} // namespace
diff --git a/src/core/hle/service/news_s.cpp b/src/core/hle/service/news_s.cpp
index 1850f59bd..d7537875b 100644
--- a/src/core/hle/service/news_s.cpp
+++ b/src/core/hle/service/news_s.cpp
@@ -19,7 +19,7 @@ const Interface::FunctionInfo FunctionTable[] = {
19// Interface class 19// Interface class
20 20
21Interface::Interface() { 21Interface::Interface() {
22 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 22 Register(FunctionTable);
23} 23}
24 24
25} // namespace 25} // namespace
diff --git a/src/core/hle/service/news_u.cpp b/src/core/hle/service/news_u.cpp
index b5adad4c6..a9e161c23 100644
--- a/src/core/hle/service/news_u.cpp
+++ b/src/core/hle/service/news_u.cpp
@@ -19,7 +19,7 @@ const Interface::FunctionInfo FunctionTable[] = {
19// Interface class 19// Interface class
20 20
21Interface::Interface() { 21Interface::Interface() {
22 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 22 Register(FunctionTable);
23} 23}
24 24
25} // namespace 25} // namespace
diff --git a/src/core/hle/service/nim_aoc.cpp b/src/core/hle/service/nim_aoc.cpp
index 17d1c4ff5..ab2ef4429 100644
--- a/src/core/hle/service/nim_aoc.cpp
+++ b/src/core/hle/service/nim_aoc.cpp
@@ -25,7 +25,7 @@ const Interface::FunctionInfo FunctionTable[] = {
25// Interface class 25// Interface class
26 26
27Interface::Interface() { 27Interface::Interface() {
28 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 28 Register(FunctionTable);
29} 29}
30 30
31} // namespace 31} // namespace
diff --git a/src/core/hle/service/ns_s.cpp b/src/core/hle/service/ns_s.cpp
index b9aca4257..5cf3e2039 100644
--- a/src/core/hle/service/ns_s.cpp
+++ b/src/core/hle/service/ns_s.cpp
@@ -21,7 +21,7 @@ const Interface::FunctionInfo FunctionTable[] = {
21// Interface class 21// Interface class
22 22
23Interface::Interface() { 23Interface::Interface() {
24 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 24 Register(FunctionTable);
25} 25}
26 26
27} // namespace 27} // namespace
diff --git a/src/core/hle/service/nwm_uds.cpp b/src/core/hle/service/nwm_uds.cpp
index ce456a966..61fcb54ce 100644
--- a/src/core/hle/service/nwm_uds.cpp
+++ b/src/core/hle/service/nwm_uds.cpp
@@ -26,7 +26,7 @@ const Interface::FunctionInfo FunctionTable[] = {
26// Interface class 26// Interface class
27 27
28Interface::Interface() { 28Interface::Interface() {
29 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 29 Register(FunctionTable);
30} 30}
31 31
32} // namespace 32} // namespace
diff --git a/src/core/hle/service/pm_app.cpp b/src/core/hle/service/pm_app.cpp
index 529dccafb..d61eaf80f 100644
--- a/src/core/hle/service/pm_app.cpp
+++ b/src/core/hle/service/pm_app.cpp
@@ -26,7 +26,7 @@ const Interface::FunctionInfo FunctionTable[] = {
26// Interface class 26// Interface class
27 27
28Interface::Interface() { 28Interface::Interface() {
29 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 29 Register(FunctionTable);
30} 30}
31 31
32} // namespace 32} // namespace
diff --git a/src/core/hle/service/ptm_play.cpp b/src/core/hle/service/ptm_play.cpp
index ae9e2925c..b357057fd 100644
--- a/src/core/hle/service/ptm_play.cpp
+++ b/src/core/hle/service/ptm_play.cpp
@@ -22,7 +22,7 @@ const Interface::FunctionInfo FunctionTable[] = {
22// Interface class 22// Interface class
23 23
24Interface::Interface() { 24Interface::Interface() {
25 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 25 Register(FunctionTable);
26} 26}
27 27
28} // namespace 28} // namespace
diff --git a/src/core/hle/service/ptm_sysm.cpp b/src/core/hle/service/ptm_sysm.cpp
index 4b5f86a47..b6f688de3 100644
--- a/src/core/hle/service/ptm_sysm.cpp
+++ b/src/core/hle/service/ptm_sysm.cpp
@@ -50,7 +50,7 @@ const Interface::FunctionInfo FunctionTable[] = {
50// Interface class 50// Interface class
51 51
52Interface::Interface() { 52Interface::Interface() {
53 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 53 Register(FunctionTable);
54} 54}
55 55
56} // namespace 56} // namespace
diff --git a/src/core/hle/service/ptm_u.cpp b/src/core/hle/service/ptm_u.cpp
index 753180add..7b465a348 100644
--- a/src/core/hle/service/ptm_u.cpp
+++ b/src/core/hle/service/ptm_u.cpp
@@ -137,7 +137,7 @@ const Interface::FunctionInfo FunctionTable[] = {
137// Interface class 137// Interface class
138 138
139Interface::Interface() { 139Interface::Interface() {
140 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 140 Register(FunctionTable);
141 // Create the SharedExtSaveData archive 0xF000000B and the gamecoin.dat file 141 // Create the SharedExtSaveData archive 0xF000000B and the gamecoin.dat file
142 // TODO(Subv): In the future we should use the FS service to query this archive 142 // TODO(Subv): In the future we should use the FS service to query this archive
143 std::string nand_directory = FileUtil::GetUserPath(D_NAND_IDX); 143 std::string nand_directory = FileUtil::GetUserPath(D_NAND_IDX);
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h
index 533d3565b..121e69932 100644
--- a/src/core/hle/service/service.h
+++ b/src/core/hle/service/service.h
@@ -5,11 +5,12 @@
5#pragma once 5#pragma once
6 6
7#include <algorithm> 7#include <algorithm>
8#include <map>
9#include <string> 8#include <string>
10#include <unordered_map> 9#include <unordered_map>
11#include <vector> 10#include <vector>
12 11
12#include <boost/container/flat_map.hpp>
13
13#include "common/common.h" 14#include "common/common.h"
14#include "common/string_util.h" 15#include "common/string_util.h"
15#include "core/mem_map.h" 16#include "core/mem_map.h"
@@ -69,21 +70,6 @@ public:
69 return "[UNKNOWN SERVICE PORT]"; 70 return "[UNKNOWN SERVICE PORT]";
70 } 71 }
71 72
72 /// Allocates a new handle for the service
73 Handle CreateHandle(Kernel::Object *obj) {
74 // TODO(yuriks): Fix error reporting
75 Handle handle = Kernel::g_handle_table.Create(obj).ValueOr(INVALID_HANDLE);
76 m_handles.push_back(handle);
77 return handle;
78 }
79
80 /// Frees a handle from the service
81 template <class T>
82 void DeleteHandle(const Handle handle) {
83 Kernel::g_handle_table.Close(handle);
84 m_handles.erase(std::remove(m_handles.begin(), m_handles.end(), handle), m_handles.end());
85 }
86
87 ResultVal<bool> SyncRequest() override { 73 ResultVal<bool> SyncRequest() override {
88 u32* cmd_buff = Kernel::GetCommandBuffer(); 74 u32* cmd_buff = Kernel::GetCommandBuffer();
89 auto itr = m_functions.find(cmd_buff[0]); 75 auto itr = m_functions.find(cmd_buff[0]);
@@ -109,16 +95,17 @@ protected:
109 /** 95 /**
110 * Registers the functions in the service 96 * Registers the functions in the service
111 */ 97 */
112 void Register(const FunctionInfo* functions, int len) { 98 template <size_t N>
113 for (int i = 0; i < len; i++) { 99 void Register(const FunctionInfo (&functions)[N]) {
114 m_functions[functions[i].id] = functions[i]; 100 m_functions.reserve(N);
101 for (auto& fn : functions) {
102 // Usually this array is sorted by id already, so hint to instead at the end
103 m_functions.emplace_hint(m_functions.cend(), fn.id, fn);
115 } 104 }
116 } 105 }
117 106
118private: 107private:
119 108 boost::container::flat_map<u32, FunctionInfo> m_functions;
120 std::vector<Handle> m_handles;
121 std::map<u32, FunctionInfo> m_functions;
122 109
123}; 110};
124 111
diff --git a/src/core/hle/service/soc_u.cpp b/src/core/hle/service/soc_u.cpp
index bb8ee86be..414c53c54 100644
--- a/src/core/hle/service/soc_u.cpp
+++ b/src/core/hle/service/soc_u.cpp
@@ -734,7 +734,7 @@ const Interface::FunctionInfo FunctionTable[] = {
734// Interface class 734// Interface class
735 735
736Interface::Interface() { 736Interface::Interface() {
737 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 737 Register(FunctionTable);
738} 738}
739 739
740Interface::~Interface() { 740Interface::~Interface() {
diff --git a/src/core/hle/service/srv.cpp b/src/core/hle/service/srv.cpp
index c50aebf15..b140e9fe3 100644
--- a/src/core/hle/service/srv.cpp
+++ b/src/core/hle/service/srv.cpp
@@ -63,7 +63,7 @@ const Interface::FunctionInfo FunctionTable[] = {
63// Interface class 63// Interface class
64 64
65Interface::Interface() { 65Interface::Interface() {
66 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 66 Register(FunctionTable);
67} 67}
68 68
69} // namespace 69} // namespace
diff --git a/src/core/hle/service/ssl_c.cpp b/src/core/hle/service/ssl_c.cpp
index 360516cdf..3f49c1c97 100644
--- a/src/core/hle/service/ssl_c.cpp
+++ b/src/core/hle/service/ssl_c.cpp
@@ -22,7 +22,7 @@ const Interface::FunctionInfo FunctionTable[] = {
22// Interface class 22// Interface class
23 23
24Interface::Interface() { 24Interface::Interface() {
25 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 25 Register(FunctionTable);
26} 26}
27 27
28} // namespace 28} // namespace
diff --git a/src/core/hle/service/y2r_u.cpp b/src/core/hle/service/y2r_u.cpp
index b3d873ef0..fc76d2721 100644
--- a/src/core/hle/service/y2r_u.cpp
+++ b/src/core/hle/service/y2r_u.cpp
@@ -54,7 +54,7 @@ const Interface::FunctionInfo FunctionTable[] = {
54// Interface class 54// Interface class
55 55
56Interface::Interface() { 56Interface::Interface() {
57 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 57 Register(FunctionTable);
58} 58}
59 59
60} // namespace 60} // namespace