• R/O
  • SSH
  • HTTPS

ppregnessem: Commit


Commit MetaInfo

Revision119 (tree)
Time2010-10-09 00:41:45
Authorkamoya

Log Message

avoid ARRAYSIZE macro

Change Summary

Incremental Difference

--- trunk/StrRsc/src/OptionDlg.cpp (revision 118)
+++ trunk/StrRsc/src/OptionDlg.cpp (revision 119)
@@ -1,5 +1,6 @@
11 #include "OptionDlg.h"
22
3+#include <array>
34 #include <shlwapi.h>
45 #if defined(_MSC_VER)
56 #pragma comment(lib, "shlwapi.lib")
@@ -37,14 +38,11 @@
3738 HANDLE Handle;
3839 FindFileHandle(HANDLE handle)
3940 :Handle(handle)
40- {
41- }
41+ {}
4242 ~FindFileHandle()
4343 {
4444 if(Handle != INVALID_HANDLE_VALUE)
45- {
4645 FindClose(Handle);
47- }
4846 }
4947 };
5048
@@ -86,10 +84,10 @@
8684 StrRsc::g_StrResource->GetLocalStr(SectionName,RS_CANCEL).c_str());
8785
8886 // ロケール設定
89- TCHAR exePath[MAX_PATH];
90- GetModuleFileName(NULL, exePath, ARRAYSIZE(exePath));
87+ std::array<TCHAR, MAX_PATH> exePath;
88+ GetModuleFileName(NULL, exePath.data(), std::tuple_size<decltype(exePath)>::value);
9189
92- const tstring langDir = ExtractFilePath(exePath) + TEXT("Plugins\\StrRsc\\Language\\");
90+ const tstring langDir = ExtractFilePath(exePath.data()) + TEXT("Plugins\\StrRsc\\Language\\");
9391
9492 DirectoryList localeList;
9593
--- trunk/StrRsc/src/StrRsc.cpp (revision 118)
+++ trunk/StrRsc/src/StrRsc.cpp (revision 119)
@@ -2,6 +2,7 @@
22
33 #include <algorithm>
44 #include <vector>
5+#include <array>
56 #include <windows.h>
67 #include <shlwapi.h>
78 #if defined(_MSC_VER)
@@ -71,10 +72,10 @@
7172
7273 void StrRscMain::RegisterIniFile(const tstring &pluginName)
7374 {
74- TCHAR exePath[MAX_PATH];
75- GetModuleFileName(NULL, exePath, ARRAYSIZE(exePath));
75+ std::array<TCHAR, MAX_PATH> exePath;
76+ GetModuleFileName(NULL, exePath.data(), std::tuple_size<decltype(exePath)>::value);
7677
77- const tstring filePath = ExtractFilePath(exePath)
78+ const tstring filePath = ExtractFilePath(exePath.data())
7879 + TEXT("Plugins\\StrRsc\\Language\\")
7980 + Config.Locale + TEXT('\\')
8081 + pluginName + TEXT(".txt");
--- trunk/StrRsc/src/StrRscConfig.cpp (revision 118)
+++ trunk/StrRsc/src/StrRscConfig.cpp (revision 119)
@@ -1,5 +1,6 @@
11 #include "StrRscConfig.h"
22
3+#include <array>
34 #include <windows.h>
45 #include <shlwapi.h>
56 #if defined(_MSC_VER)
@@ -23,9 +24,9 @@
2324 if(!PathFileExists(fileName.c_str()))
2425 return;
2526
26- TCHAR buff[MAX_PATH];
27- GetPrivateProfileString(SectionName,KeyName,Locale.c_str(),buff,ARRAYSIZE(buff),fileName.c_str());
28- Locale = buff;
27+ std::array<TCHAR, MAX_PATH> buff;
28+ GetPrivateProfileString(SectionName,KeyName,Locale.c_str(),buff.data(),std::tuple_size<decltype(buff)>::value,fileName.c_str());
29+ Locale = buff.data();
2930 }
3031
3132 // StrRsc.iniにLocaleの書込み
--- trunk/ProfMan/src/ProfMan.cpp (revision 118)
+++ trunk/ProfMan/src/ProfMan.cpp (revision 119)
@@ -25,7 +25,7 @@
2525 ProfManMain g_profManMain;
2626
2727 const char passSeed[] = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
28- const int passSeedCount = ARRAYSIZE(passSeed) -1;
28+ const std::size_t passSeedCount = std::extent<decltype(passSeed)>::value - 1;
2929
3030 std::string EncodePassword(const std::string &str)
3131 {
@@ -171,13 +171,13 @@
171171 if(!PathFileExists(fileName.c_str()))
172172 return;
173173
174- TCHAR buff[1024] = {0};
174+ std::array<TCHAR, 1024> buff = {};
175175
176- GetPrivateProfileSectionNames(buff, ARRAYSIZE(buff), fileName.c_str());
176+ GetPrivateProfileSectionNames(buff.data(), std::tuple_size<decltype(buff)>::value, fileName.c_str());
177177
178178 std::vector<tstring> sections;
179179
180- TCHAR *buffIt = buff;
180+ TCHAR *buffIt = buff.data();
181181 for(tstring tmp = buffIt; tmp.size(); tmp = buffIt)
182182 {
183183 sections.push_back(tmp);
@@ -191,28 +191,28 @@
191191 ProfileListSub prof(new Profile());
192192 Profiles.push_back(prof);
193193
194- GetPrivateProfileString(it->c_str(), NULL, NULL, buff, ARRAYSIZE(buff), fileName.c_str());
194+ GetPrivateProfileString(it->c_str(), NULL, NULL, buff.data(), std::tuple_size<decltype(buff)>::value, fileName.c_str());
195195
196- buffIt = buff;
196+ buffIt = buff.data();
197197 for(tstring key = buffIt; key.size(); key = buffIt)
198198 {
199- TCHAR buff2[1024];
200- GetPrivateProfileString(it->c_str(), key.c_str(), L"", buff2, ARRAYSIZE(buff2), fileName.c_str());
199+ std::array<TCHAR, 1024> buff2;
200+ GetPrivateProfileString(it->c_str(), key.c_str(), L"", buff2.data(), std::tuple_size<decltype(buff2)>::value, fileName.c_str());
201201
202202 if(*it == KeyName::ProfileName)
203- prof->ProfileName = buff2;
203+ prof->ProfileName = buff2.data();
204204 else if(*it == KeyName::Account)
205- prof->Account = buff2;
205+ prof->Account = buff2.data();
206206 else if(*it == KeyName::Password)
207- prof->Password = DecodePassword(buff2);
207+ prof->Password = DecodePassword(buff2.data());
208208 else if(*it == KeyName::Protocol)
209- prof->Protocol = buff2;
209+ prof->Protocol = buff2.data();
210210 else if(*it == KeyName::Name)
211- prof->Name = buff2;
211+ prof->Name = buff2.data();
212212 else if(*it == KeyName::Status)
213213 prof->Status = GetPrivateProfileInt(it->c_str(), key.c_str(), 0, fileName.c_str());
214214 else
215- prof->Specific[key] = buff2;
215+ prof->Specific[key] = buff2.data();
216216
217217 buffIt += key.size() + 1;
218218 }
--- trunk/FileIO/src/OptionDlg.cpp (revision 118)
+++ trunk/FileIO/src/OptionDlg.cpp (revision 119)
@@ -25,51 +25,51 @@
2525 const LPCTSTR OptionDlg::KeyName::PlaceToStoreReceivedFile = TEXT("PlaceToStoreReceivedFile");
2626 const LPCTSTR OptionDlg::KeyName::SelectFilePath = TEXT("SelectFilePath");
2727
28- INT_PTR OptionDlg::ShowOptionDialog(const HWND parent) const
28+ INT_PTR OptionDlg::ShowOptionDialog(HWND parent) const
2929 {
30- return DialogBoxParam(g_hInstance,MAKEINTRESOURCE(IDD_OPTION),parent,DialogFunc,reinterpret_cast<LPARAM>(this));
30+ return DialogBoxParam(g_hInstance, MAKEINTRESOURCE(IDD_OPTION), parent, DialogFunc, reinterpret_cast<LPARAM>(this));
3131 }
3232
33- void OptionDlg::OnInitDialog(const HWND hDialog) const
33+ void OptionDlg::OnInitDialog(HWND hDialog) const
3434 {
35- SetWindowText(hDialog,StrRsc::g_StrResource->GetLocalStr(SectionName, KeyName::DialogCaption).c_str());
35+ SetWindowText(hDialog, StrRsc::g_StrResource->GetLocalStr(SectionName, KeyName::DialogCaption).c_str());
3636
37- SetDlgItemText(hDialog,IDC_LABEL100,
37+ SetDlgItemText(hDialog, IDC_LABEL100,
3838 StrRsc::g_StrResource->GetLocalStr(SectionName, KeyName::PlaceToStoreReceivedFile).c_str());
3939
40- SetDlgItemText(hDialog,IDOK,
40+ SetDlgItemText(hDialog, IDOK,
4141 StrRsc::g_StrResource->GetLocalStr(SectionName, KeyName::Ok).c_str());
4242
43- SetDlgItemText(hDialog,IDCANCEL,
43+ SetDlgItemText(hDialog, IDCANCEL,
4444 StrRsc::g_StrResource->GetLocalStr(SectionName, KeyName::Cancel).c_str());
4545
4646 //--
4747
48- SetDlgItemText(hDialog,IDC_EDTRCVDIR,FileDir.c_str());
48+ SetDlgItemText(hDialog, IDC_EDTRCVDIR, FileDir.c_str());
4949 }
5050
51- void OptionDlg::OnEndDialog(const HWND hDialog, const DWORD modalResult)
51+ void OptionDlg::OnEndDialog(HWND hDialog, DWORD modalResult)
5252 {
5353 if(modalResult == IDOK)
5454 {
5555 LRESULT len = SendDlgItemMessage(hDialog, IDC_EDTRCVDIR, WM_GETTEXTLENGTH, 0, 0);
5656
57- std::vector<TCHAR> fileDir(len+1);
57+ std::vector<TCHAR> fileDir(len + 1);
5858
59- SendDlgItemMessage(hDialog, IDC_EDTRCVDIR, WM_GETTEXT, fileDir.size(), reinterpret_cast<LPARAM>(&fileDir[0]));
60- FileDir = &fileDir[0];
59+ SendDlgItemMessage(hDialog, IDC_EDTRCVDIR, WM_GETTEXT, fileDir.size(), reinterpret_cast<LPARAM>(fileDir.data()));
60+ FileDir = fileDir.data();
6161 }
6262 }
6363
64- INT_PTR CALLBACK OptionDlg::DialogFunc(const HWND hDialog, const UINT message, const WPARAM wParam, const LPARAM lParam)
64+ INT_PTR CALLBACK OptionDlg::DialogFunc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam)
6565 {
6666 OptionDlg *const dlg = (message != WM_INITDIALOG) ?
67- reinterpret_cast<OptionDlg*>(GetWindowLongPtr(hDialog,GWLP_USERDATA)) : reinterpret_cast<OptionDlg*>(lParam);
67+ reinterpret_cast<OptionDlg*>(GetWindowLongPtr(hDialog, GWLP_USERDATA)) : reinterpret_cast<OptionDlg*>(lParam);
6868
6969 switch(message)
7070 {
7171 case WM_INITDIALOG:
72- SetWindowLongPtr(hDialog,GWLP_USERDATA,lParam);
72+ SetWindowLongPtr(hDialog, GWLP_USERDATA, lParam);
7373 dlg->OnInitDialog(hDialog);
7474 return TRUE;
7575 case WM_COMMAND:
@@ -82,24 +82,24 @@
8282 EndDialog(hDialog, id);
8383 return TRUE;
8484 case IDC_BTNSELFILE:
85- TCHAR path[MAX_PATH] = {0};
86-
8785 const tstring title =
8886 StrRsc::g_StrResource->GetLocalStr(SectionName, KeyName::SelectFilePath, TEXT("保存フォルダの選択"));
8987
90- BROWSEINFO browse = {0};
88+ TCHAR path[MAX_PATH] = {};
89+
90+ BROWSEINFO browse = {};
9191 browse.hwndOwner = hDialog;
9292 browse.lpszTitle = title.c_str();
9393 browse.ulFlags = BIF_RETURNONLYFSDIRS;
9494 browse.pszDisplayName = path;
9595
96- if(SUCCEEDED(CoInitializeEx(NULL,COINIT_APARTMENTTHREADED)))
96+ if(SUCCEEDED(CoInitializeEx(NULL, COINIT_APARTMENTTHREADED)))
9797 {
9898 PIDLIST_ABSOLUTE idList = SHBrowseForFolder(&browse);
99- if(idList != NULL)
99+ if(idList)
100100 {
101- SHGetPathFromIDList(idList,path);
102- SetDlgItemText(hDialog,IDC_EDTRCVDIR,path);
101+ SHGetPathFromIDList(idList, path);
102+ SetDlgItemText(hDialog, IDC_EDTRCVDIR, path);
103103 CoTaskMemFree(idList);
104104 }
105105
--- trunk/FileIO/src/OptionDlg.h (revision 118)
+++ trunk/FileIO/src/OptionDlg.h (revision 119)
@@ -25,12 +25,12 @@
2525 static const LPCTSTR SelectFilePath;
2626 };
2727 //-----------------------
28- void OnInitDialog(const HWND hDialog) const;
29- void OnEndDialog(const HWND hDialog,const DWORD modalResult);
30- static INT_PTR CALLBACK DialogFunc(const HWND hDialog,const UINT message,const WPARAM wParam,const LPARAM lParam);
28+ void OnInitDialog(HWND hDialog) const;
29+ void OnEndDialog(HWND hDialog, DWORD modalResult);
30+ static INT_PTR CALLBACK DialogFunc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam);
3131 public:
3232 tstring FileDir;
33- INT_PTR ShowOptionDialog(const HWND parent) const;
33+ INT_PTR ShowOptionDialog(HWND parent) const;
3434 };
3535 }
3636 }
--- trunk/FileIO/src/FileIO.cpp (revision 118)
+++ trunk/FileIO/src/FileIO.cpp (revision 119)
@@ -97,7 +97,7 @@
9797
9898 for(int count = 1; PathFileExists(newPath.c_str()); ++count)
9999 {
100- newPath = tstring(&buff[0]) + TEXT("(") + ToString(count) + TEXT(")") + ext;
100+ newPath = tstring(buff.data()) + TEXT('(') + ToString(count) + TEXT(')') + ext;
101101 }
102102
103103 return HandlePathPair(
--- trunk/FileIO/src/FileIOConfig.cpp (revision 118)
+++ trunk/FileIO/src/FileIOConfig.cpp (revision 119)
@@ -1,3 +1,4 @@
1+#include <array>
12 #include <windows.h>
23 #include <shlwapi.h>
34 #if defined(_MSC_VER)
@@ -22,9 +23,9 @@
2223 if(!PathFileExists(fileName.c_str()))
2324 return;
2425
25- TCHAR buff[MAX_PATH];
26- GetPrivateProfileString(SectionName,KeyName,FileDir.c_str(),buff,ARRAYSIZE(buff),fileName.c_str());
27- FileDir = buff;
26+ std::array<TCHAR, MAX_PATH> buff;
27+ GetPrivateProfileString(SectionName,KeyName,FileDir.c_str(),buff.data(),std::tuple_size<decltype(buff)>::value,fileName.c_str());
28+ FileDir = buff.data();
2829 }
2930
3031 void FileIOConfig::SaveToFile(const tstring &fileName) const
--- trunk/Common/dummy.h (revision 118)
+++ trunk/Common/dummy.h (revision 119)
@@ -11,7 +11,7 @@
1111
1212 namespace dummy_private
1313 {
14- template <typename T> struct to_string_type {};
14+ template <typename T> struct to_string_type;
1515 template <> struct to_string_type<int> { typedef long long cast_type; };
1616 template <> struct to_string_type<long> { typedef long long cast_type; };
1717 template <> struct to_string_type<long long> { typedef long long cast_type; };
@@ -59,15 +59,13 @@
5959 }
6060
6161 template <typename T, typename U>
62-std::basic_string<T> ConvertString(const std::basic_string<U> &str,
63- typename std::enable_if<std::is_same<T, U>::value>::type* = 0)
62+std::basic_string<typename std::enable_if<std::is_same<T, U>::value, T>::type> ConvertString(const std::basic_string<U> &str)
6463 {
6564 return str;
6665 }
6766
6867 template <typename T, typename U>
69-std::basic_string<T> ConvertString(const std::basic_string<U> &str,
70- typename std::enable_if<!std::is_same<T, U>::value>::type* = 0)
68+std::basic_string<typename std::enable_if<!std::is_same<T, U>::value, T>::type> ConvertString(const std::basic_string<U> &str)
7169 {
7270 return dummy_private::t2x(str);
7371 }
--- trunk/Common/StrResource.cpp (revision 118)
+++ trunk/Common/StrResource.cpp (revision 119)
@@ -1,7 +1,7 @@
11 #include "StrResource.h"
22
3-#include <cstring>
43 #include <vector>
4+#include <array>
55
66 #include <shlwapi.h>
77 #if defined(_MSC_VER)
@@ -54,13 +54,13 @@
5454
5555 tstring StrResource::GetPluginName()
5656 {
57- TCHAR buff[MAX_PATH];
57+ std::array<TCHAR, MAX_PATH> buff;
5858
59- GetModuleFileName(g_hInstance, buff, ARRAYSIZE(buff));
60- PathStripPath(buff);
61- PathRemoveExtension(buff);
59+ GetModuleFileName(g_hInstance, buff.data(), std::tuple_size<decltype(buff)>::value);
60+ PathStripPath(buff.data());
61+ PathRemoveExtension(buff.data());
6262
63- return buff;
63+ return buff.data();
6464 }
6565
6666 HNsmService StrResource::GetService(const tstring &serviceName) const
@@ -87,8 +87,8 @@
8787
8888 if(HService)
8989 {
90- char buff[1024] = {0};
91- NsmStrRsc rs = {0};
90+ std::array<char, 1024> buff = {};
91+ NsmStrRsc rs = {};
9292
9393 std::string rsSection = t2c(section);
9494 std::string rsKey = t2c(key);
@@ -99,8 +99,8 @@
9999 rs.lpSectionName = rsSection.c_str();
100100 rs.lpMessageTag = rsKey.c_str();
101101 rs.lpDefaultStr = rsDefStr.c_str();
102- rs.nBufferSize = ARRAYSIZE(buff);
103- rs.lpBuffer = buff;
102+ rs.nBufferSize = std::tuple_size<decltype(buff)>::value;
103+ rs.lpBuffer = buff.data();
104104
105105 if(InitInfo.CallService(HService, reinterpret_cast<WPARAM>(&rs), 0) != 0)
106106 result = c2t(rs.lpBuffer);
--- trunk/Common/NsmPluginMain.cpp (revision 118)
+++ trunk/Common/NsmPluginMain.cpp (revision 119)
@@ -54,17 +54,17 @@
5454 {
5555 }
5656
57- tstring NsmPluginMain::GetPluginInfo(const int index) const
57+ tstring NsmPluginMain::GetPluginInfo(int index) const
5858 {
59- if(0 <= index && index < ARRAYSIZE(PluginInfo))
59+ if(0 <= index && index < std::tuple_size<decltype(PluginInfo)>::value)
6060 return PluginInfo[index];
6161
62- return TEXT("");
62+ return tstring();
6363 }
6464
65- void NsmPluginMain::SetPluginInfo(const int index,const tstring &value)
65+ void NsmPluginMain::SetPluginInfo(int index,const tstring &value)
6666 {
67- if(0 <= index && index < ARRAYSIZE(PluginInfo))
67+ if(0 <= index && index < std::tuple_size<decltype(PluginInfo)>::value)
6868 PluginInfo[index] = value;
6969 }
7070
@@ -76,10 +76,10 @@
7676
7777 tstring NsmPluginMain::GetDllFileName()
7878 {
79- TCHAR buff[MAX_PATH];
80- GetModuleFileName(g_hInstance, buff, ARRAYSIZE(buff));
79+ std::array<TCHAR, MAX_PATH> buff;
80+ GetModuleFileName(g_hInstance, buff.data(), std::tuple_size<decltype(buff)>::value);
8181
82- return buff;
82+ return buff.data();
8383 }
8484
8585 tstring NsmPluginMain::GetWorkDir()
--- trunk/Common/NsmGetSetInfo.cpp (revision 118)
+++ trunk/Common/NsmGetSetInfo.cpp (revision 119)
@@ -1,6 +1,9 @@
1+#include "NsmGetSetInfo.h"
2+
3+#include <array>
4+
15 #include "dummy.h"
26 #include "NsmInfoUtility.h"
3-#include "NsmGetSetInfo.h"
47
58 namespace Regnessem
69 {
@@ -23,14 +26,14 @@
2326 //--
2427
2528 NsmGetInfo::NsmGetInfo(const TNsmPluginInitInfo &initInfo)
26- : NsmInfoBase(initInfo),
27- HGetPluginInfo(GetService(NMS_SYSTEM_GETPLUGININFO)),
28- HGetConnectionInfo(GetService(NMS_SYSTEM_CONNECTION_GETINFO)),
29- HGetConnectionMemberInfo(GetService(NMS_SYSTEM_CONNECTION_MEMBERS_GETINFO)),
30- HGetConnectionGroupInfo(GetService(NMS_SYSTEM_CONNECTION_GROUPS_GETINFO)),
31- HGetSessionInfo(GetService(NMS_SYSTEM_SESSION_GETINFO)),
32- HGetSessionMemberInfo(GetService(NMS_SYSTEM_SESSION_MEMBERS_GETINFO)),
33- HGetFileSessionInfo(GetService(NMS_SYSTEM_FILESESSION_GETINFO))
29+ :NsmInfoBase(initInfo)
30+ ,HGetPluginInfo(GetService(NMS_SYSTEM_GETPLUGININFO))
31+ ,HGetConnectionInfo(GetService(NMS_SYSTEM_CONNECTION_GETINFO))
32+ ,HGetConnectionMemberInfo(GetService(NMS_SYSTEM_CONNECTION_MEMBERS_GETINFO))
33+ ,HGetConnectionGroupInfo(GetService(NMS_SYSTEM_CONNECTION_GROUPS_GETINFO))
34+ ,HGetSessionInfo(GetService(NMS_SYSTEM_SESSION_GETINFO))
35+ ,HGetSessionMemberInfo(GetService(NMS_SYSTEM_SESSION_MEMBERS_GETINFO))
36+ ,HGetFileSessionInfo(GetService(NMS_SYSTEM_FILESESSION_GETINFO))
3437 {}
3538
3639 LONG_PTR NsmGetInfo::GetConnectionInfo(HNsmConnection handle, const PNsmInfo nsmInfo, int infoKey) const
@@ -90,18 +93,18 @@
9093
9194 std::string NsmGetInfo::GetPluginInfo(const std::string &moduleName, int infoKey) const
9295 {
93- char buff[BufferSize] = {0};
96+ std::array<char, BufferSize> buff = {};
9497
95- TNsmPluginInfo pluginInfo = {0};
96- pluginInfo.cbSize = sizeof(TNsmPluginInfo);
98+ TNsmPluginInfo pluginInfo = {};
99+ pluginInfo.cbSize = sizeof(pluginInfo);
97100 pluginInfo.lpModuleName = moduleName.c_str();
98101 pluginInfo.nInfoNo = infoKey;
99- pluginInfo.lpBuffer = buff;
100- pluginInfo.nBufferSize = ARRAYSIZE(buff);
102+ pluginInfo.lpBuffer = buff.data();
103+ pluginInfo.nBufferSize = std::tuple_size<decltype(buff)>::value;
101104
102105 InitInfo.CallService(HGetPluginInfo, reinterpret_cast<WPARAM>(&pluginInfo), 0);
103106
104- return buff;
107+ return buff.data();
105108 }
106109
107110 std::wstring NsmGetInfo::GetConnectionInfoStr(HNsmConnection handle, int infoKey) const
--- trunk/Common/NsmPluginMain.h (revision 118)
+++ trunk/Common/NsmPluginMain.h (revision 119)
@@ -1,6 +1,8 @@
11 #ifndef NSMPLUGINMAIN_H
22 #define NSMPLUGINMAIN_H
33
4+#include <array>
5+
46 #include "UNsmConsts.h"
57 #include "NsmTypes.h"
68 #include "tstring.h"
@@ -13,7 +15,7 @@
1315 {
1416 private:
1517 bool Initialized;
16- tstring PluginInfo[NMPI_PLUGINVER + 1];
18+ std::array<tstring, NMPI_PLUGINVER + 1> PluginInfo;
1719 protected:
1820 virtual void DoInitialize();
1921 virtual void DoTerminate();
@@ -38,8 +40,8 @@
3840 int HookEvent(const tstring &eventName,const TNsmEventProc procAddr) const;
3941 int UnhookEvent(const tstring &eventName,const TNsmEventProc procAddr) const;
4042
41- tstring GetPluginInfo(const int index) const;
42- void SetPluginInfo(const int index,const tstring &value);
43+ tstring GetPluginInfo(int index) const;
44+ void SetPluginInfo(int index,const tstring &value);
4345 bool IsInitialized() const;
4446 };
4547 }
--- trunk/Common/dummy.cpp (revision 118)
+++ trunk/Common/dummy.cpp (revision 119)
@@ -6,6 +6,7 @@
66 #include <stdexcept>
77 #include <vector>
88 #include <iomanip>
9+#include <array>
910
1011 #if defined(_WINDOWS)
1112 #include <windows.h>
@@ -111,15 +112,16 @@
111112
112113 Regnessem::tstring TimeToStr(std::time_t t)
113114 {
114- TCHAR buffer[16];
115+ std::array<TCHAR, 16> buffer;
115116 #if defined(_MSC_VER) && !defined(WINCE)
116117 tm tmp;
117118 localtime_s(&tmp, &t);
118- _tcsftime(buffer, ARRAYSIZE(buffer), TEXT("%H:%M:%S"), &tmp);
119+
120+ _tcsftime(buffer.data(), std::tuple_size<decltype(buffer)>::value, TEXT("%H:%M:%S"), &tmp);
119121 #else
120- _tcsftime(buffer,sizeof(buffer)/sizeof(buffer[0]),TEXT("%H:%M:%S"), localtime(&t));
122+ _tcsftime(buffer.data(), std::tuple_size<decltype(buffer)>::value, TEXT("%H:%M:%S"), localtime(&t));
121123 #endif
122- return buffer;
124+ return buffer.data();
123125 }
124126
125127 Regnessem::tstring ExtractFileName(const Regnessem::tstring &fileName)
@@ -228,7 +230,7 @@
228230
229231 AutoVaList ls;
230232
231- va_start(ls.List,fmt);
233+ va_start(ls.List, fmt);
232234
233235 #if defined(_MSC_VER) && !defined(WINCE)
234236 int length = _vsctprintf(fmt, ls.List) + 1;
@@ -236,20 +238,16 @@
236238 return fmt;
237239
238240 std::vector<TCHAR> buffer(length);
239- int result = _vstprintf_s(&buffer[0],length,fmt,ls.List);
241+ int result = _vstprintf_s(buffer.data(), buffer.size(), fmt, ls.List);
240242 #else
241- std::vector<TCHAR> buffer(8192);
242-#if defined(_MSC_VER) && defined(WINCE)
243- int result = _vsntprintf(&buffer.front(),8192,fmt,ls.List);
244-#else
245- int result = vsnprintf(&buffer.front(),8192,fmt,ls.List);
243+ std::array<TCHAR, 8192> buffer;
244+ int result = _vsntprintf(buffer.data(), buffer.size(), fmt, ls.List);
245+ buffer.back() = TCHAR();
246246 #endif
247- *buffer.rbegin() = TEXT('\0');
248-#endif
249247 if(result < 0)
250248 return fmt;
251249
252- return &buffer[0];
250+ return buffer.data();
253251 }
254252
255253 #if defined(WINCE)
--- trunk/nsmsgs/src/UNsmPlugin.h (revision 118)
+++ trunk/nsmsgs/src/UNsmPlugin.h (revision 119)
@@ -36,16 +36,16 @@
3636
3737 FARPROC ProcAddress(LPCSTR procName) const;
3838
39- NsmPlugin(const NsmPlugin &other);
40- NsmPlugin& operator=(const NsmPlugin &other);
39+ NsmPlugin(const NsmPlugin &);
40+ NsmPlugin& operator=(const NsmPlugin &);
4141 public:
4242 struct FindByModuleName
4343 {
4444 const tstring x;
4545 explicit FindByModuleName(const tstring &s);
46- bool operator()(const NsmPluginListSub& v)const;
46+ bool operator()(const NsmPluginListSub &v)const;
4747 private:
48- FindByModuleName& operator=(const FindByModuleName& other);
48+ FindByModuleName& operator=(const FindByModuleName &);
4949 };
5050
5151 struct NsmPluginInfoEx
--- trunk/nsmsgs/src/UFrmNsmMainDebug.h (revision 118)
+++ trunk/nsmsgs/src/UFrmNsmMainDebug.h (revision 119)
@@ -62,7 +62,7 @@
6262 void Cls_OnKey(HWND /* hwnd */, UINT vk, BOOL /* fDown */, int /* cRepeat */, UINT /* flags */) const;
6363 void Cls_OnDestroy(HWND /* hwnd */) const;
6464 public:
65- explicit NsmMainDebug(HWND hParent);
65+ NsmMainDebug();
6666 ~NsmMainDebug();
6767 };
6868 }
--- trunk/nsmsgs/src/nsmsgs.cpp (revision 118)
+++ trunk/nsmsgs/src/nsmsgs.cpp (revision 119)
@@ -1,6 +1,8 @@
11 #include "nsmsgs.h"
22
3+#include <array>
34 #include <algorithm>
5+
46 #if defined(_WINDOWS)
57 #include <windows.h>
68 #else
@@ -97,23 +99,23 @@
9799 }
98100 #endif
99101
100- WPARAM Initialize(int argc,TCHAR**argv)
102+ WPARAM Initialize(int argc, TCHAR** argv)
101103 {
102- HANDLE mutex = CreateMutex(NULL,FALSE,Application::Title);
104+ HANDLE mutex = CreateMutex(NULL, FALSE, Application::Title);
103105 if(!mutex)
104106 return 0;
105107
106- const bool isRestart = (std::find(argv+1,argv+argc,tstring(CommandLineOption::Restart))!=argv+argc);
108+ const bool isRestart = (std::find(argv + 1, argv + argc, tstring(CommandLineOption::Restart)) != argv + argc);
107109
108- if(WaitForSingleObject(mutex,isRestart ? 60000 : 0) == WAIT_TIMEOUT)
110+ if(WaitForSingleObject(mutex, isRestart ? 60000 : 0) == WAIT_TIMEOUT)
109111 {
110112 // 多重起動禁止
111- if(std::find(argv+1,argv+argc,tstring(CommandLineOption::ForceExecute))==argv+argc)
113+ if(std::find(argv + 1, argv + argc, tstring(CommandLineOption::ForceExecute)) == argv + argc)
112114 return 0;
113115 }
114116
115117 #ifndef WINCE
116- g_NsmCom.DebugMode = (std::find(argv+1,argv+argc,tstring(CommandLineOption::Debug))!=argv+argc);
118+ g_NsmCom.DebugMode = (std::find(argv + 1, argv + argc, tstring(CommandLineOption::Debug)) != argv + argc);
117119 #else
118120 g_NsmCom.DebugMode = false;
119121 #endif
@@ -126,7 +128,7 @@
126128 }
127129 else
128130 {
129- g_NsmCom.DebugWindow.reset(new NsmMainDebug(/*[TODO]適当にnullわたしています*/NULL));
131+ g_NsmCom.DebugWindow.reset(new NsmMainDebug());
130132 g_NsmCom.DebugWindow->Initialize();
131133 }
132134
@@ -139,7 +141,7 @@
139141 if(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
140142 {
141143 // HACK:delphiメッセージ
142- if ((WM_KEYFIRST <= msg.message && msg.message <= WM_KEYLAST))
144+ if((WM_KEYFIRST <= msg.message && msg.message <= WM_KEYLAST))
143145 {
144146 if(SendMessage(msg.hwnd, CN_BASE + msg.message, msg.wParam, msg.lParam))
145147 continue;
@@ -184,7 +186,7 @@
184186 int APIENTRY _tWinMain(HINSTANCE /* hInstance */, HINSTANCE /* hPrevInstance */, LPTSTR /* lptCmdLine */, int /* nCmdShow */)
185187 {
186188 #if defined(_MSC_VER)
187- return static_cast<int>(nsmsgs::Initialize(__argc,__targv));
189+ return static_cast<int>(nsmsgs::Initialize(__argc, __targv));
188190 #else
189191
190192 int argc;
@@ -219,9 +221,9 @@
219221 tstring Application::ExeName()
220222 {
221223 #ifdef _WINDOWS
222- TCHAR filename[MAX_PATH];
223- GetModuleFileName(GetModuleHandle(NULL),filename,ARRAYSIZE(filename));
224- return filename;
224+ std::array<TCHAR, MAX_PATH> filename;
225+ GetModuleFileName(GetModuleHandle(NULL), filename.data(), std::tuple_size<decltype(filename)>::value);
226+ return filename.data();
225227 #else
226228 // [TODO] テスト用あとで直す Binary Hacksあたり参照
227229 return "./a.exe";
--- trunk/nsmsgs/src/UNsmSystem.cpp (revision 118)
+++ trunk/nsmsgs/src/UNsmSystem.cpp (revision 119)
@@ -2,6 +2,7 @@
22
33 #include <cassert>
44 #include <algorithm>
5+#include <array>
56
67 #include "../../Common/UNsmConsts.h"
78 #include "../../Common/dummy.h"
@@ -146,7 +147,7 @@
146147 DisconnectAll();
147148
148149 const NsmPluginList &p = Plugins;
149- for(NsmPluginList::const_iterator it = p.begin();it != p.end();++it)
150+ for(NsmPluginList::const_iterator it = p.begin(); it != p.end(); ++it)
150151 (*it)->Terminate();
151152 Plugins.clear();
152153
@@ -154,12 +155,12 @@
154155 }
155156
156157 // connection に関連したセッションを全て閉じる
157- void NsmSystem::CloseRelatedSessions(const NsmConnection *const connection)
158+ void NsmSystem::CloseRelatedSessions(const NsmConnection* connection)
158159 {
159160 NsmThreadSessionList::AutoLock lock(Sessions);
160161 NsmSessionList &sesList = lock.List();
161162
162- for(NsmSessionList::size_type i = sesList.size() ; i ; --i)
163+ for(NsmSessionList::size_type i = sesList.size(); i; --i)
163164 {
164165 const NsmSession *const session = sesList.at(i - 1).get();
165166
@@ -166,7 +167,7 @@
166167 if(session->Connection == connection)
167168 {
168169 const tstring fmt = format(NMS_PROTOCOL_SESSION_CLOSE, connection->Protocol.c_str());
169- g_NsmCom.CallService(g_NsmCom.GetService(fmt),reinterpret_cast<WPARAM>(session), 0);
170+ g_NsmCom.CallService(g_NsmCom.GetService(fmt), reinterpret_cast<WPARAM>(session), 0);
170171 }
171172 }
172173 }
@@ -177,7 +178,7 @@
177178 NsmThreadSessionList::AutoLock lock(Sessions);
178179 NsmSessionList &sesList = lock.List();
179180
180- for(NsmSessionList::size_type i = sesList.size() ; i ; --i)
181+ for(NsmSessionList::size_type i = sesList.size(); i; --i)
181182 {
182183 const NsmSession *const session = sesList.at(i - 1).get();
183184
@@ -187,12 +188,12 @@
187188 }
188189
189190 // session に関連したファイルセッションを全て閉じる
190- void NsmSystem::CloseRelatedFileSessions(const NsmSession *const session)
191+ void NsmSystem::CloseRelatedFileSessions(const NsmSession* session)
191192 {
192193 NsmThreadFileSessionList::AutoLock lock(FileSessions);
193194 NsmFileSessionList &fileSesList = lock.List();
194195
195- for(NsmFileSessionList::size_type i = fileSesList.size(); i ; --i)
196+ for(NsmFileSessionList::size_type i = fileSesList.size(); i; --i)
196197 {
197198 const NsmFileSession *const fileSes = fileSesList.at(i - 1).get();
198199
@@ -210,7 +211,7 @@
210211 NsmThreadFileSessionList::AutoLock lock(FileSessions);
211212 NsmFileSessionList &fileSesList = lock.List();
212213
213- for(NsmFileSessionList::size_type i = fileSesList.size(); i ; --i)
214+ for(NsmFileSessionList::size_type i = fileSesList.size(); i; --i)
214215 {
215216 const NsmFileSession *const fileSes = fileSesList.at(i - 1).get();
216217
@@ -225,7 +226,7 @@
225226 NsmThreadConnectionList::AutoLock lock(Connections);
226227 NsmConnectionList &conList = lock.List();
227228
228- for(NsmConnectionList::size_type i = conList.size(); i ; --i)
229+ for(NsmConnectionList::size_type i = conList.size(); i; --i)
229230 {
230231 const NsmConnection *const connection = conList.at(i - 1).get();
231232
@@ -237,7 +238,7 @@
237238 void NsmSystem::DoConnectionChange()
238239 {
239240 const NsmMainDebug *const wnd = g_NsmCom.DebugWindow.get();
240- if (OnConnectionChange!=NULL && wnd != NULL)
241+ if(OnConnectionChange != NULL && wnd != NULL)
241242 (wnd->*OnConnectionChange)();
242243 }
243244
@@ -244,13 +245,13 @@
244245 void NsmSystem::DoSessionChange()
245246 {
246247 const NsmMainDebug *const wnd = g_NsmCom.DebugWindow.get();
247- if (OnSessionChange!=NULL && wnd != NULL)
248+ if(OnSessionChange != NULL && wnd != NULL)
248249 (wnd->*OnSessionChange)();
249250 }
250251
251252 void NsmSystem::DoFileSessionChange()
252253 {
253- if (OnFileSessionChange)
254+ if(OnFileSessionChange)
254255 OnFileSessionChange(this);
255256 }
256257
@@ -257,7 +258,7 @@
257258 void NsmSystem::DoModuleChange()
258259 {
259260 const NsmMainDebug *const wnd = g_NsmCom.DebugWindow.get();
260- if (OnModuleChange!=NULL && wnd != NULL)
261+ if(OnModuleChange != NULL && wnd != NULL)
261262 (wnd->*OnModuleChange)();
262263 }
263264
@@ -283,7 +284,7 @@
283284
284285 {
285286 WIN32_FIND_DATA fd;
286- FindFileHandle h(FindFirstFile(path.c_str(),&fd));
287+ FindFileHandle h(FindFirstFile(path.c_str(), &fd));
287288
288289 if(h.Handle == INVALID_HANDLE_VALUE)
289290 return;
@@ -290,32 +291,32 @@
290291
291292 const tstring dir = ExtractFilePath(path);
292293
293- do{
294+ do {
294295 NsmPluginListSub t(new NsmPlugin(dir + fd.cFileName));
295296
296297 if(t->IsLoaded() &&
297- t->PluginInfo.ApiVersion == NSM_API_VERSION &&
298- t->PluginInfo.ModuleName != NMM_SYSTEM &&
299- std::find_if(Plugins.begin(), Plugins.end(),
300- NsmPlugin::FindByModuleName(t->PluginInfo.ModuleName)) == Plugins.end())
298+ t->PluginInfo.ApiVersion == NSM_API_VERSION &&
299+ t->PluginInfo.ModuleName != NMM_SYSTEM &&
300+ std::find_if(Plugins.begin(), Plugins.end(),
301+ NsmPlugin::FindByModuleName(t->PluginInfo.ModuleName)) == Plugins.end())
301302 {
302303 Plugins.push_back(t);
303304 }
304- }while(FindNextFile(h.Handle, &fd));
305+ } while(FindNextFile(h.Handle, &fd));
305306 }
306307
307308 #else
308309 // [TODO]超絶手抜きです。 誰かまともなコードに直して
309- FILE*fp = popen(("dir "+path).c_str(),"r");
310+ FILE*fp = popen(("dir " + path).c_str(), "r");
310311 char buf[256];
311- while(fscanf(fp,"%255s",buf)==1){
312+ while(fscanf(fp, "%255s", buf) == 1){
312313 std::unique_ptr<TNsmPlugin> t(buf));
313314
314315 if(t->DllHandle != NULL &&
315- t->PluginInfo.ApiVersion == NSM_API_VERSION &&
316- t->PluginInfo.ModuleName != NMM_SYSTEM &&
317- std::find_if(Plugins.begin(),Plugins.end(),
318- std::bind2nd(TNsmPluginListFindByModuleName(),t->PluginInfo.ModuleName)) == Plugins.end())
316+ t->PluginInfo.ApiVersion == NSM_API_VERSION &&
317+ t->PluginInfo.ModuleName != NMM_SYSTEM &&
318+ std::find_if(Plugins.begin(), Plugins.end(),
319+ std::bind2nd(TNsmPluginListFindByModuleName(), t->PluginInfo.ModuleName)) == Plugins.end())
319320 {
320321 Plugins.push_back(TNsmPluginListSub(t.release()));
321322 }
@@ -328,7 +329,7 @@
328329
329330 // -----------------------------------------------------------------------------
330331
331- LONG_PTR Service::DoExit(const WPARAM /* wParam */,const LPARAM /* lParam */)
332+ LONG_PTR Service::DoExit(WPARAM /* wParam */, LPARAM /* lParam */)
332333 {
333334 #ifdef _WINDOWS
334335 Application::Terminate();
@@ -338,7 +339,7 @@
338339 return 0;
339340 }
340341
341- LONG_PTR Service::DoDebugPrint(const WPARAM wParam,const LPARAM /* lParam */)
342+ LONG_PTR Service::DoDebugPrint(WPARAM wParam, LPARAM /* lParam */)
342343 {
343344 if(wParam)
344345 g_NsmCom.DoLog(c2t(reinterpret_cast<char *>(wParam)), true);
@@ -346,16 +347,16 @@
346347 return 0;
347348 }
348349
349- LONG_PTR Service::DoEnumProtocols(const WPARAM wParam,const LPARAM lParam)
350+ LONG_PTR Service::DoEnumProtocols(WPARAM wParam, LPARAM lParam)
350351 {
351352 const NsmPluginList &p = g_NsmSystem.Plugins;
352- for(NsmPluginList::const_iterator it = p.begin();it != p.end();++it)
353+ for(NsmPluginList::const_iterator it = p.begin(); it != p.end(); ++it)
353354 {
354355 const tstring moduleName = (*it)->PluginInfo.ModuleName;
355- if (Common::ModuleUtility::ExtractModuleType(moduleName) == NMM_PROTOCOL)
356+ if(Common::ModuleUtility::ExtractModuleType(moduleName) == NMM_PROTOCOL)
356357 {
357358 const tstring protcolName = Common::ModuleUtility::ExtractProtocolName(moduleName);
358- reinterpret_cast<TEnumProtocolCallback>(wParam) (t2c(protcolName).c_str(), lParam);
359+ reinterpret_cast<TEnumProtocolCallback>(wParam)(t2c(protcolName).c_str(), lParam);
359360 }
360361 }
361362
@@ -362,16 +363,16 @@
362363 return 0;
363364 }
364365
365- LONG_PTR Service::DoEnumModules(const WPARAM wParam,const LPARAM lParam)
366+ LONG_PTR Service::DoEnumModules(WPARAM wParam, LPARAM lParam)
366367 {
367368 const NsmPluginList &p = g_NsmSystem.Plugins;
368- for(NsmPluginList::const_iterator it = p.begin();it != p.end();++it)
369- reinterpret_cast<TEnumModuleCallback>(wParam) (t2c((*it)->PluginInfo.ModuleName).c_str(), lParam);
369+ for(NsmPluginList::const_iterator it = p.begin(); it != p.end(); ++it)
370+ reinterpret_cast<TEnumModuleCallback>(wParam)(t2c((*it)->PluginInfo.ModuleName).c_str(), lParam);
370371
371372 return 0;
372373 }
373374
374- LONG_PTR Service::DoGetPluginInfo(const WPARAM wParam,const LPARAM /* lParam */ )
375+ LONG_PTR Service::DoGetPluginInfo(WPARAM wParam, LPARAM /* lParam */ )
375376 {
376377 const PNsmPluginInfo pin = reinterpret_cast<PNsmPluginInfo>(wParam);
377378
@@ -380,17 +381,17 @@
380381
381382 const NsmPluginList &p = g_NsmSystem.Plugins;
382383 NsmPluginList::const_iterator it =
383- std::find_if(p.begin(),p.end(),NsmPlugin::FindByModuleName(c2t(pin->lpModuleName)));
384+ std::find_if(p.begin(), p.end(), NsmPlugin::FindByModuleName(c2t(pin->lpModuleName)));
384385
385386 if(it != p.end())
386387 return (*it)->GetPluginInfo(pin->nInfoNo, pin->lpBuffer, pin->nBufferSize);
387388
388- if (c2t(pin->lpModuleName) != NMM_SYSTEM)
389+ if(c2t(pin->lpModuleName) != NMM_SYSTEM)
389390 return 0;
390391
391392 tstring infoStr;
392393
393- switch (pin->nInfoNo)
394+ switch(pin->nInfoNo)
394395 {
395396 case NMPI_APIVER:
396397 infoStr = NSM_API_VERSION;
@@ -421,14 +422,14 @@
421422 if(result.empty())
422423 return 0;
423424
424- std::string::size_type len = std::min<std::string::size_type>(pin->nBufferSize-1,result.size());
425+ std::string::size_type len = std::min<std::string::size_type>(pin->nBufferSize - 1, result.size());
425426
426427 result.resize(len);
427428
428429 #if defined(_MSC_VER) && !defined(WINCE)
429- strcpy_s(pin->lpBuffer,pin->nBufferSize,result.c_str());
430+ strcpy_s(pin->lpBuffer, pin->nBufferSize, result.c_str());
430431 #else
431- strcpy(pin->lpBuffer,result.c_str());
432+ strcpy(pin->lpBuffer, result.c_str());
432433 #endif
433434
434435 return static_cast<LONG_PTR>(len);
@@ -436,7 +437,7 @@
436437
437438 // Connection ------------------------------------------------------------------
438439
439- LONG_PTR Service::DoCreateConnection(const WPARAM wParam,const LPARAM lParam)
440+ LONG_PTR Service::DoCreateConnection(WPARAM wParam, LPARAM lParam)
440441 {
441442 if(!wParam)
442443 return 0;
@@ -447,8 +448,8 @@
447448 NsmConnectionList &p = lock.List();
448449
449450 result.reset(new NsmConnection(
450- c2t(reinterpret_cast<char*>(wParam)),
451- c2t(reinterpret_cast<char*>(lParam ? lParam : wParam))));
451+ c2t(reinterpret_cast<char*>(wParam)),
452+ c2t(reinterpret_cast<char*>(lParam ? lParam : wParam))));
452453
453454 p.push_back(result);
454455 }
@@ -459,7 +460,7 @@
459460 return reinterpret_cast<LONG_PTR>(result.get());
460461 }
461462
462- LONG_PTR Service::DoDeleteConnection(const WPARAM wParam,const LPARAM /* lParam */ )
463+ LONG_PTR Service::DoDeleteConnection(WPARAM wParam, LPARAM /* lParam */ )
463464 {
464465 {
465466 NsmThreadConnectionList::AutoLock lock(g_NsmSystem.Connections);
@@ -466,7 +467,7 @@
466467 NsmConnectionList &p = lock.List();
467468
468469 NsmConnectionList::iterator it =
469- std::find_if(p.begin(), p.end(),NsmConnection::FindByHandle(reinterpret_cast<NsmConnection *>(wParam)));
470+ std::find_if(p.begin(), p.end(), NsmConnection::FindByHandle(reinterpret_cast<NsmConnection *>(wParam)));
470471 if(it == p.end())
471472 return -1;
472473
@@ -480,7 +481,7 @@
480481 return 1;
481482 }
482483
483- LONG_PTR Service::DoGetConnectionInfo(const WPARAM wParam,const LPARAM lParam)
484+ LONG_PTR Service::DoGetConnectionInfo(WPARAM wParam, LPARAM lParam)
484485 {
485486 const NsmConnection *const connection = reinterpret_cast<NsmConnection *>(wParam);
486487 const PNsmConnectionInfo pin = reinterpret_cast<PNsmConnectionInfo>(lParam);
@@ -488,10 +489,10 @@
488489 NsmThreadConnectionList::ConstAutoLock lock(g_NsmSystem.Connections);
489490 const NsmConnectionList &p = lock.List();
490491
491- if (std::find_if(p.begin(), p.end(), NsmConnection::FindByHandle(connection)) == p.end())
492+ if(std::find_if(p.begin(), p.end(), NsmConnection::FindByHandle(connection)) == p.end())
492493 return 0;
493494
494- switch (pin->nInfoKey)
495+ switch(pin->nInfoKey)
495496 {
496497 case NMCI_PROTOCOL:
497498 //HACK:API 2.3
@@ -515,7 +516,7 @@
515516 return Common::NsmInfoUtility::IntToNsmInfo(pin->lpInfo, connection->User.MailStatus);
516517 case NMCI_USER_COMMENT:
517518 return Common::NsmInfoUtility::StrToNsmInfo(pin->lpInfo, connection->User.Comment);
518- // MSN7アイコンとFriendly パラメータ
519+ // MSN7アイコンとFriendly パラメータ
519520 case NMCI_USER_TILE:
520521 return Common::NsmInfoUtility::StrToNsmInfo(pin->lpInfo, connection->User.FilePath);
521522 case NMCI_USER_FRIENDLY:
@@ -528,7 +529,7 @@
528529 }
529530 }
530531
531- LONG_PTR Service::DoSetConnectionInfo(const WPARAM wParam,const LPARAM lParam)
532+ LONG_PTR Service::DoSetConnectionInfo(WPARAM wParam, LPARAM lParam)
532533 {
533534 NsmConnection *const connection = reinterpret_cast<NsmConnection *>(wParam);
534535
@@ -535,11 +536,11 @@
535536 NsmThreadConnectionList::ConstAutoLock lock(g_NsmSystem.Connections);
536537 const NsmConnectionList &p = lock.List();
537538
538- if (std::find_if(p.begin(), p.end(), NsmConnection::FindByHandle(connection)) == p.end())
539+ if(std::find_if(p.begin(), p.end(), NsmConnection::FindByHandle(connection)) == p.end())
539540 return 0;
540541
541542 const TNsmConnectionInfo &pin = *reinterpret_cast<PNsmConnectionInfo>(lParam);
542- switch (pin.nInfoKey)
543+ switch(pin.nInfoKey)
543544 {
544545 case NMCI_PROTOCOL:
545546 //ReadOnly
@@ -592,13 +593,13 @@
592593 return 1;
593594 }
594595
595- LONG_PTR Service::DoEnumConnections(const WPARAM wParam,const LPARAM lParam)
596+ LONG_PTR Service::DoEnumConnections(WPARAM wParam, LPARAM lParam)
596597 {
597598 NsmThreadConnectionList::ConstAutoLock lock(g_NsmSystem.Connections);
598599 const NsmConnectionList &p = lock.List();
599600
600- for (NsmConnectionList::const_iterator it = p.begin(); it != p.end(); ++it)
601- reinterpret_cast<TEnumConnectionCallback>(wParam) (reinterpret_cast<HNsmConnection>(it->get()), lParam);
601+ for(NsmConnectionList::const_iterator it = p.begin(); it != p.end(); ++it)
602+ reinterpret_cast<TEnumConnectionCallback>(wParam)(reinterpret_cast<HNsmConnection>(it->get()), lParam);
602603
603604 return 0;
604605 }
@@ -605,7 +606,7 @@
605606
606607 // -----------------------------------------------------------------------------
607608
608- LONG_PTR Service::DoAddMember(const WPARAM wParam,const LPARAM lParam)
609+ LONG_PTR Service::DoAddMember(WPARAM wParam, LPARAM lParam)
609610 {
610611 if(!lParam)
611612 return 0;
@@ -615,7 +616,7 @@
615616 const NsmConnectionList &p = lock.List();
616617 NsmConnectionList::const_iterator it =
617618 std::find_if(p.begin(), p.end(), NsmConnection::FindByHandle(reinterpret_cast<NsmConnection *>(wParam)));
618- if (it == p.end())
619+ if(it == p.end())
619620 return 0;
620621
621622 const TAddMemberInfo &pin = *reinterpret_cast<PAddMemberInfo>(lParam);
@@ -627,7 +628,7 @@
627628
628629 NsmMemberList &list = (*it)->SelectList(pin.nListKind);
629630
630- if(!list.insert(NsmMemberList::value_type(q->Account,q)).second)
631+ if(!list.insert(NsmMemberList::value_type(q->Account, q)).second)
631632 return 0;
632633 }
633634 g_NsmCom.NotifyEvent(g_NsmSystem.HConnectionMembersAdd, wParam, lParam);
@@ -634,7 +635,7 @@
634635 return 1;
635636 }
636637
637- LONG_PTR Service::DoRemoveMember(const WPARAM wParam,const LPARAM lParam)
638+ LONG_PTR Service::DoRemoveMember(WPARAM wParam, LPARAM lParam)
638639 {
639640 {
640641 NsmThreadConnectionList::ConstAutoLock lock(g_NsmSystem.Connections);
@@ -641,12 +642,12 @@
641642 const NsmConnectionList &p = lock.List();
642643 NsmConnectionList::const_iterator it =
643644 std::find_if(p.begin(), p.end(), NsmConnection::FindByHandle(reinterpret_cast<NsmConnection *>(wParam)));
644- if (it == p.end())
645+ if(it == p.end())
645646 return 0;
646647
647648 NsmMemberList &list = (*it)->SelectList(reinterpret_cast<PNsmMemberInfo>(lParam)->nListKind);
648649 NsmMemberList::iterator it2 = list.find(c2t(reinterpret_cast<PRemoveMemberInfo>(lParam)->lpAccount));
649- if (it2 == list.end())
650+ if(it2 == list.end())
650651 return 0;
651652
652653 list.erase(it2);
@@ -655,7 +656,7 @@
655656 return 1;
656657 }
657658
658- LONG_PTR Service::DoSetMemberInfo(const WPARAM wParam,const LPARAM lParam)
659+ LONG_PTR Service::DoSetMemberInfo(WPARAM wParam, LPARAM lParam)
659660 {
660661 const TNsmMemberInfo &MemberInfo = *reinterpret_cast<PNsmMemberInfo>(lParam);
661662 {
@@ -663,17 +664,17 @@
663664 const NsmConnectionList &p = lock.List();
664665 NsmConnectionList::const_iterator it =
665666 std::find_if(p.begin(), p.end(), NsmConnection::FindByHandle(reinterpret_cast<NsmConnection *>(wParam)));
666- if (it == p.end())
667+ if(it == p.end())
667668 return 0;
668669
669670 const NsmMemberList &list = (*it)->SelectList(reinterpret_cast<PNsmMemberInfo>(lParam)->nListKind);
670671 NsmMemberList::const_iterator it2 = list.find(c2t(reinterpret_cast<PRemoveMemberInfo>(lParam)->lpAccount));
671- if (it2 == list.end())
672+ if(it2 == list.end())
672673 return 0;
673674
674675 g_NsmCom.NotifyEvent(g_NsmSystem.HConnectionMembersInfoChanging, wParam, lParam);
675676 NsmMember &Member = *it2->second;
676- switch (MemberInfo.nInfoKey)
677+ switch(MemberInfo.nInfoKey)
677678 {
678679 case NMMI_ACCOUNT:
679680 Member.Account = Common::NsmInfoUtility::NsmInfoToStr(MemberInfo.lpInfo);
@@ -710,28 +711,28 @@
710711 break;
711712 }
712713 }
713- if ((MemberInfo.nFlags & NMIF_NOCHANGEEVENT) == 0)
714+ if((MemberInfo.nFlags & NMIF_NOCHANGEEVENT) == 0)
714715 g_NsmCom.NotifyEvent(g_NsmSystem.HConnectionMembersInfoChange, wParam, lParam);
715716 return 1;
716717 }
717718
718- LONG_PTR Service::DoGetMemberInfo(const WPARAM wParam,const LPARAM lParam)
719+ LONG_PTR Service::DoGetMemberInfo(WPARAM wParam, LPARAM lParam)
719720 {
720721 NsmThreadConnectionList::ConstAutoLock lock(g_NsmSystem.Connections);
721722 const NsmConnectionList &p = lock.List();
722723 NsmConnectionList::const_iterator it =
723724 std::find_if(p.begin(), p.end(), NsmConnection::FindByHandle(reinterpret_cast<NsmConnection *>(wParam)));
724- if (it == p.end())
725+ if(it == p.end())
725726 return 0;
726727
727728 const PNsmMemberInfo pin = reinterpret_cast<PNsmMemberInfo>(lParam);
728729 const NsmMemberList &list = (*it)->SelectList(pin->nListKind);
729730 NsmMemberList::const_iterator it2 = list.find(c2t(pin->lpAccount));
730- if (it2 == list.end())
731+ if(it2 == list.end())
731732 return 0;
732733
733734 const NsmMember &Member = *it2->second;
734- switch (pin->nInfoKey)
735+ switch(pin->nInfoKey)
735736 {
736737 case NMMI_ACCOUNT:
737738 //HACK:API 2.3
@@ -760,7 +761,7 @@
760761 }
761762 }
762763
763- LONG_PTR Service::DoEnumMembers(const WPARAM wParam,const LPARAM lParam)
764+ LONG_PTR Service::DoEnumMembers(WPARAM wParam, LPARAM lParam)
764765 {
765766 NsmThreadConnectionList::ConstAutoLock lock(g_NsmSystem.Connections);
766767 const NsmConnectionList &p = lock.List();
@@ -768,13 +769,13 @@
768769 NsmConnectionList::const_iterator it =
769770 std::find_if(p.begin(), p.end(), NsmConnection::FindByHandle(reinterpret_cast<NsmConnection *>(wParam)));
770771
771- if (it == p.end())
772+ if(it == p.end())
772773 return 0;
773774
774775 const TEnumMemberInfo &pin = *reinterpret_cast<PEnumMemberInfo>(lParam);
775776 const NsmMemberList &list = (*it)->SelectList(pin.nListKind);
776777
777- for(NsmMemberList::const_iterator it2 = list.begin() ; it2 != list.end(); ++it2)
778+ for(NsmMemberList::const_iterator it2 = list.begin(); it2 != list.end(); ++it2)
778779 {
779780 const NsmMember &Member = *it2->second;
780781 pin.lpCallBackProc(t2c(Member.Account).c_str(), pin.nData);
@@ -782,12 +783,12 @@
782783 return 0;
783784 }
784785
785- LONG_PTR Service::DoBeginUpdate(const WPARAM /* wParam */ ,const LPARAM /* lParam */ )
786+ LONG_PTR Service::DoBeginUpdate(WPARAM /* wParam */, LPARAM /* lParam */ )
786787 {
787788 return 0;
788789 }
789790
790- LONG_PTR Service::DoEndUpdate(const WPARAM /* wParam */ ,const LPARAM /* lParam */ )
791+ LONG_PTR Service::DoEndUpdate(WPARAM /* wParam */, LPARAM /* lParam */ )
791792 {
792793 return 0;
793794 }
@@ -794,7 +795,7 @@
794795
795796 // Group -----------------------------------------------------------------------
796797
797- LONG_PTR Service::DoAddGroup(const WPARAM wParam,const LPARAM lParam)
798+ LONG_PTR Service::DoAddGroup(WPARAM wParam, LPARAM lParam)
798799 {
799800 {
800801 NsmThreadConnectionList::ConstAutoLock lock(g_NsmSystem.Connections);
@@ -801,7 +802,7 @@
801802 const NsmConnectionList &p = lock.List();
802803 NsmConnectionList::const_iterator it =
803804 std::find_if(p.begin(), p.end(), NsmConnection::FindByHandle(reinterpret_cast<NsmConnection *>(wParam)));
804- if (it == p.end())
805+ if(it == p.end())
805806 return 0;
806807
807808 NsmGroupList &group = (*it)->Groups;
@@ -816,7 +817,7 @@
816817 return 1;
817818 }
818819
819- LONG_PTR Service::DoRemoveGroup(const WPARAM wParam,const LPARAM lParam)
820+ LONG_PTR Service::DoRemoveGroup(WPARAM wParam, LPARAM lParam)
820821 {
821822 {
822823 NsmThreadConnectionList::ConstAutoLock lock(g_NsmSystem.Connections);
@@ -823,12 +824,12 @@
823824 const NsmConnectionList &p = lock.List();
824825 NsmConnectionList::const_iterator it =
825826 std::find_if(p.begin(), p.end(), NsmConnection::FindByHandle(reinterpret_cast<NsmConnection *>(wParam)));
826- if (it == p.end())
827+ if(it == p.end())
827828 return 0;
828829
829- NsmGroupList::iterator it2 =
830- std::find_if((*it)->Groups.begin(),(*it)->Groups.end(),NsmGroup::FindById(static_cast<int>(lParam)));
831- if (it2 == (*it)->Groups.end())
830+ NsmGroupList::iterator it2 =
831+ std::find_if((*it)->Groups.begin(), (*it)->Groups.end(), NsmGroup::FindById(static_cast<int>(lParam)));
832+ if(it2 == (*it)->Groups.end())
832833 return 0;
833834
834835 (*it)->Groups.erase(it2);
@@ -838,7 +839,7 @@
838839 return 1;
839840 }
840841
841- LONG_PTR Service::DoSetGroupInfo(const WPARAM wParam,const LPARAM lParam)
842+ LONG_PTR Service::DoSetGroupInfo(WPARAM wParam, LPARAM lParam)
842843 {
843844 TNsmGroupInfo & GroupInfo = *reinterpret_cast<PNsmGroupInfo>(lParam);
844845 {
@@ -846,15 +847,15 @@
846847 const NsmConnectionList &p = lock.List();
847848 NsmConnectionList::const_iterator it =
848849 std::find_if(p.begin(), p.end(), NsmConnection::FindByHandle(reinterpret_cast<NsmConnection *>(wParam)));
849- if (it == p.end())
850+ if(it == p.end())
850851 return 0;
851852
852- NsmGroupList::iterator it2 =
853- std::find_if((*it)->Groups.begin(),(*it)->Groups.end(),NsmGroup::FindById(GroupInfo.nGroupId));
854- if (it2 == (*it)->Groups.end())
853+ NsmGroupList::iterator it2 =
854+ std::find_if((*it)->Groups.begin(), (*it)->Groups.end(), NsmGroup::FindById(GroupInfo.nGroupId));
855+ if(it2 == (*it)->Groups.end())
855856 return 0;
856857
857- switch (reinterpret_cast<PNsmGroupInfo>(lParam)->nInfoKey)
858+ switch(reinterpret_cast<PNsmGroupInfo>(lParam)->nInfoKey)
858859 {
859860 case NMGI_ID:
860861 (*it2)->Id = Common::NsmInfoUtility::NsmInfoToInt(GroupInfo.lpInfo);
@@ -870,28 +871,28 @@
870871 break;
871872 }
872873 }
873- if ((GroupInfo.nFlags & NMIF_NOCHANGEEVENT) == 0)
874+ if((GroupInfo.nFlags & NMIF_NOCHANGEEVENT) == 0)
874875 g_NsmCom.NotifyEvent(g_NsmSystem.HConnectionGroupsInfoChange, wParam, lParam);
875876 return 1;
876877 }
877878
878- LONG_PTR Service::DoGetGroupInfo(const WPARAM wParam,const LPARAM lParam)
879+ LONG_PTR Service::DoGetGroupInfo(WPARAM wParam, LPARAM lParam)
879880 {
880881 NsmThreadConnectionList::ConstAutoLock lock(g_NsmSystem.Connections);
881882 const NsmConnectionList &p = lock.List();
882883 NsmConnectionList::const_iterator it =
883884 std::find_if(p.begin(), p.end(), NsmConnection::FindByHandle(reinterpret_cast<NsmConnection *>(wParam)));
884- if (it == p.end())
885+ if(it == p.end())
885886 return 0;
886887
887888 PNsmGroupInfo pin = reinterpret_cast<PNsmGroupInfo>(lParam);
888889
889- NsmGroupList::iterator it2 =
890- std::find_if((*it)->Groups.begin(),(*it)->Groups.end(),NsmGroup::FindById(pin->nGroupId));
891- if (it2 == (*it)->Groups.end())
890+ NsmGroupList::iterator it2 =
891+ std::find_if((*it)->Groups.begin(), (*it)->Groups.end(), NsmGroup::FindById(pin->nGroupId));
892+ if(it2 == (*it)->Groups.end())
892893 return 0;
893894
894- switch (pin->nInfoKey)
895+ switch(pin->nInfoKey)
895896 {
896897 case NMGI_ID:
897898 return Common::NsmInfoUtility::IntToNsmInfo(pin->lpInfo, (*it2)->Id);
@@ -906,17 +907,17 @@
906907 return 0;
907908 }
908909
909- LONG_PTR Service::DoEnumGroups(const WPARAM wParam,const LPARAM lParam)
910+ LONG_PTR Service::DoEnumGroups(WPARAM wParam, LPARAM lParam)
910911 {
911912 NsmThreadConnectionList::ConstAutoLock lock(g_NsmSystem.Connections);
912913 const NsmConnectionList &p = lock.List();
913914 NsmConnectionList::const_iterator it =
914915 std::find_if(p.begin(), p.end(), NsmConnection::FindByHandle(reinterpret_cast<NsmConnection *>(wParam)));
915- if (it == p.end())
916+ if(it == p.end())
916917 return 0;
917918
918919 const NsmGroupList &gList = (*it)->Groups;
919- for (NsmGroupList::const_iterator it2 = gList.begin(); it2 != gList.end(); ++it2)
920+ for(NsmGroupList::const_iterator it2 = gList.begin(); it2 != gList.end(); ++it2)
920921 {
921922 PEnumGroupInfo pin = reinterpret_cast<PEnumGroupInfo>(lParam);
922923 pin->lpCallBackProc((*it2)->Id, pin->nData);
@@ -925,12 +926,12 @@
925926 return 0;
926927 }
927928
928- LONG_PTR Service::DoBeginGroupsUpdate(const WPARAM /* wParam */,const LPARAM /* lParam */)
929+ LONG_PTR Service::DoBeginGroupsUpdate(WPARAM /* wParam */, LPARAM /* lParam */)
929930 {
930931 return 0;
931932 }
932933
933- LONG_PTR Service::DoEndGroupsUpdate(const WPARAM /* wParam */,const LPARAM /* lParam */)
934+ LONG_PTR Service::DoEndGroupsUpdate(WPARAM /* wParam */, LPARAM /* lParam */)
934935 {
935936 return 0;
936937 }
@@ -937,7 +938,7 @@
937938
938939 // Session ---------------------------------------------------------------------
939940
940- LONG_PTR Service::DoCreateSession(const WPARAM wParam,const LPARAM lParam)
941+ LONG_PTR Service::DoCreateSession(WPARAM wParam, LPARAM lParam)
941942 {
942943 NsmSessionListSub result;
943944 {
@@ -945,7 +946,7 @@
945946 const NsmConnectionList &p = lock.List();
946947 NsmConnectionList::const_iterator it =
947948 std::find_if(p.begin(), p.end(), NsmConnection::FindByHandle(reinterpret_cast<NsmConnection *>(wParam)));
948- if (it == p.end())
949+ if(it == p.end())
949950 return 0;
950951
951952 NsmThreadSessionList::AutoLock lock2(g_NsmSystem.Sessions);
@@ -962,7 +963,7 @@
962963 return reinterpret_cast<LONG_PTR>(result.get());
963964 }
964965
965- LONG_PTR Service::DoDeleteSession(const WPARAM wParam,const LPARAM /* lParam */)
966+ LONG_PTR Service::DoDeleteSession(WPARAM wParam, LPARAM /* lParam */)
966967 {
967968 {
968969 NsmThreadSessionList::AutoLock lock(g_NsmSystem.Sessions);
@@ -970,7 +971,7 @@
970971
971972 NsmSessionList::iterator it =
972973 std::find_if(p.begin(), p.end(), NsmSession::FindByHandle(reinterpret_cast<NsmSession *>(wParam)));
973- if (it == p.end())
974+ if(it == p.end())
974975 return -1;
975976
976977 g_NsmSystem.CloseRelatedFileSessions(it->get());
@@ -982,7 +983,7 @@
982983 return 1;
983984 }
984985
985- LONG_PTR Service::DoGetSessionInfo(const WPARAM wParam,const LPARAM lParam)
986+ LONG_PTR Service::DoGetSessionInfo(WPARAM wParam, LPARAM lParam)
986987 {
987988 NsmThreadSessionList::ConstAutoLock lock(g_NsmSystem.Sessions);
988989 const NsmSessionList &p = lock.List();
@@ -989,12 +990,12 @@
989990
990991 NsmSessionList::const_iterator it =
991992 std::find_if(p.begin(), p.end(), NsmSession::FindByHandle(reinterpret_cast<NsmSession *>(wParam)));
992- if (it == p.end())
993+ if(it == p.end())
993994 return 0;
994995
995996 const NsmSession &session = *reinterpret_cast<NsmSession *>(wParam);
996997 const PNsmSessionInfo pin = reinterpret_cast<PNsmSessionInfo>(lParam);
997- switch (pin->nInfoKey)
998+ switch(pin->nInfoKey)
998999 {
9991000 case NMSI_CAPTION:
10001001 return Common::NsmInfoUtility::StrToNsmInfo(pin->lpInfo, session.Caption);
@@ -1013,7 +1014,7 @@
10131014 }
10141015 }
10151016
1016- LONG_PTR Service::DoSetSessionInfo(const WPARAM wParam,const LPARAM lParam)
1017+ LONG_PTR Service::DoSetSessionInfo(WPARAM wParam, LPARAM lParam)
10171018 {
10181019 {
10191020 NsmThreadSessionList::ConstAutoLock lock(g_NsmSystem.Sessions);
@@ -1021,12 +1022,12 @@
10211022
10221023 NsmSessionList::const_iterator it =
10231024 std::find_if(p.begin(), p.end(), NsmSession::FindByHandle(reinterpret_cast<NsmSession *>(wParam)));
1024- if (it == p.end())
1025+ if(it == p.end())
10251026 return 0;
10261027
10271028 NsmSession &session = *reinterpret_cast<NsmSession *>(wParam);
10281029 const TNsmSessionInfo *const pin = reinterpret_cast<PNsmSessionInfo>(lParam);
1029- switch (pin->nInfoKey)
1030+ switch(pin->nInfoKey)
10301031 {
10311032 case NMSI_CAPTION:
10321033 session.Caption = Common::NsmInfoUtility::NsmInfoToStrW(pin->lpInfo);
@@ -1053,18 +1054,18 @@
10531054 return 1;
10541055 }
10551056
1056- LONG_PTR Service::DoEnumSessions(const WPARAM wParam,const LPARAM lParam)
1057+ LONG_PTR Service::DoEnumSessions(WPARAM wParam, LPARAM lParam)
10571058 {
10581059 NsmThreadSessionList::ConstAutoLock lock(g_NsmSystem.Sessions);
10591060 const NsmSessionList &p = lock.List();
10601061
1061- for(NsmSessionList::const_iterator it = p.begin();it!=p.end();++it)
1062+ for(NsmSessionList::const_iterator it = p.begin(); it != p.end(); ++it)
10621063 reinterpret_cast<TEnumSessionCallback>(wParam)(reinterpret_cast<HNsmSession>(it->get()), lParam);
10631064
10641065 return 0;
10651066 }
10661067
1067- LONG_PTR Service::DoAddSessionMember(const WPARAM wParam,const LPARAM lParam)
1068+ LONG_PTR Service::DoAddSessionMember(WPARAM wParam, LPARAM lParam)
10681069 {
10691070 if(!lParam)
10701071 return 0;
@@ -1075,12 +1076,12 @@
10751076
10761077 NsmSessionList::const_iterator it =
10771078 std::find_if(p.begin(), p.end(), NsmSession::FindByHandle(reinterpret_cast<NsmSession *>(wParam)));
1078- if (it == p.end())
1079+ if(it == p.end())
10791080 return 0;
10801081
10811082 NsmMemberListSub q(new NsmMember(c2t(reinterpret_cast<char *>(lParam))));
10821083
1083- if(!(*it)->Members.insert(NsmMemberList::value_type(q->Account,q)).second)
1084+ if(!(*it)->Members.insert(NsmMemberList::value_type(q->Account, q)).second)
10841085 return 0;
10851086 }
10861087
@@ -1088,7 +1089,7 @@
10881089 return 1;
10891090 }
10901091
1091- LONG_PTR Service::DoRemoveSessionMember(const WPARAM wParam,const LPARAM lParam)
1092+ LONG_PTR Service::DoRemoveSessionMember(WPARAM wParam, LPARAM lParam)
10921093 {
10931094 {
10941095 NsmThreadSessionList::ConstAutoLock lock(g_NsmSystem.Sessions);
@@ -1096,13 +1097,13 @@
10961097
10971098 NsmSessionList::const_iterator it =
10981099 std::find_if(p.begin(), p.end(), NsmSession::FindByHandle(reinterpret_cast<NsmSession *>(wParam)));
1099- if (it == p.end())
1100+ if(it == p.end())
11001101 return 0;
11011102
11021103 NsmMemberList &q = (*it)->Members;
11031104
11041105 NsmMemberList::iterator it2 = q.find(c2t(reinterpret_cast<char *>(lParam)));
1105- if (it2 != q.end())
1106+ if(it2 != q.end())
11061107 q.erase(it2);
11071108 }
11081109
@@ -1110,7 +1111,7 @@
11101111 return 1;
11111112 }
11121113
1113- LONG_PTR Service::DoSetSessionMemberInfo(const WPARAM wParam,const LPARAM lParam)
1114+ LONG_PTR Service::DoSetSessionMemberInfo(WPARAM wParam, LPARAM lParam)
11141115 {
11151116 {
11161117 NsmThreadSessionList::ConstAutoLock lock(g_NsmSystem.Sessions);
@@ -1118,16 +1119,16 @@
11181119
11191120 NsmSessionList::const_iterator it =
11201121 std::find_if(p.begin(), p.end(), NsmSession::FindByHandle(reinterpret_cast<NsmSession *>(wParam)));
1121- if (it == p.end())
1122+ if(it == p.end())
11221123 return 0;
11231124
11241125 const TNsmMemberInfo &pin = *reinterpret_cast<PNsmMemberInfo>(lParam);
11251126 NsmMemberList::iterator it2 = (*it)->Members.find(c2t(pin.lpAccount));
1126- if (it2 == (*it)->Members.end())
1127+ if(it2 == (*it)->Members.end())
11271128 return 0;
11281129
11291130 NsmMember &Member = *it2->second;
1130- switch (pin.nInfoKey)
1131+ switch(pin.nInfoKey)
11311132 {
11321133 case NMMI_ACCOUNT:
11331134 Member.Account = Common::NsmInfoUtility::NsmInfoToStr(pin.lpInfo);
@@ -1155,7 +1156,7 @@
11551156 return 1;
11561157 }
11571158
1158- LONG_PTR Service::DoGetSessionMemberInfo(const WPARAM wParam,const LPARAM lParam)
1159+ LONG_PTR Service::DoGetSessionMemberInfo(WPARAM wParam, LPARAM lParam)
11591160 {
11601161 NsmThreadSessionList::ConstAutoLock lock(g_NsmSystem.Sessions);
11611162 const NsmSessionList &p = lock.List();
@@ -1162,16 +1163,16 @@
11621163
11631164 NsmSessionList::const_iterator it =
11641165 std::find_if(p.begin(), p.end(), NsmSession::FindByHandle(reinterpret_cast<NsmSession *>(wParam)));
1165- if (it == p.end())
1166+ if(it == p.end())
11661167 return 0;
11671168
11681169 const PNsmMemberInfo pin = reinterpret_cast<PNsmMemberInfo>(lParam);
11691170 NsmMemberList::iterator it2 = (*it)->Members.find(c2t(pin->lpAccount));
1170- if (it2 == (*it)->Members.end())
1171+ if(it2 == (*it)->Members.end())
11711172 return 0;
11721173
11731174 const NsmMember &Member = *it2->second;
1174- switch (pin->nInfoKey)
1175+ switch(pin->nInfoKey)
11751176 {
11761177 case NMMI_ACCOUNT:
11771178 //HACK:API 2.3
@@ -1194,17 +1195,17 @@
11941195 }
11951196 }
11961197
1197- LONG_PTR Service::DoBeginSessionMembersUpdate(const WPARAM /* wParam */ ,const LPARAM /* lParam */ )
1198+ LONG_PTR Service::DoBeginSessionMembersUpdate(WPARAM /* wParam */, LPARAM /* lParam */ )
11981199 {
11991200 return 0;
12001201 }
12011202
1202- LONG_PTR Service::DoEndSessionMembersUpdate(const WPARAM /* wParam */ ,const LPARAM /* lParam */ )
1203+ LONG_PTR Service::DoEndSessionMembersUpdate(WPARAM /* wParam */, LPARAM /* lParam */ )
12031204 {
12041205 return 0;
12051206 }
12061207
1207- LONG_PTR Service::DoEnumSessionMembers(const WPARAM wParam,const LPARAM lParam)
1208+ LONG_PTR Service::DoEnumSessionMembers(WPARAM wParam, LPARAM lParam)
12081209 {
12091210 NsmThreadSessionList::ConstAutoLock lock(g_NsmSystem.Sessions);
12101211 const NsmSessionList &p = lock.List();
@@ -1211,12 +1212,12 @@
12111212
12121213 NsmSessionList::const_iterator it =
12131214 std::find_if(p.begin(), p.end(), NsmSession::FindByHandle(reinterpret_cast<NsmSession *>(wParam)));
1214- if (it == p.end())
1215+ if(it == p.end())
12151216 return 0;
12161217
12171218 const NsmMemberList &ls = (*it)->Members;
12181219 const TEnumMemberInfo &pin = *reinterpret_cast<PEnumMemberInfo>(lParam);
1219- for (NsmMemberList::const_iterator itr = ls.begin(); itr != ls.end(); ++itr)
1220+ for(NsmMemberList::const_iterator itr = ls.begin(); itr != ls.end(); ++itr)
12201221 {
12211222 pin.lpCallBackProc(t2c(itr->second->Account).c_str(), pin.nData);
12221223 }
@@ -1223,7 +1224,7 @@
12231224 return 0;
12241225 }
12251226
1226- LONG_PTR Service::DoSendMessage(const WPARAM wParam,const LPARAM lParam)
1227+ LONG_PTR Service::DoSendMessage(WPARAM wParam, LPARAM lParam)
12271228 {
12281229 {
12291230 NsmThreadSessionList::ConstAutoLock lock(g_NsmSystem.Sessions);
@@ -1231,7 +1232,7 @@
12311232
12321233 NsmSessionList::const_iterator it =
12331234 std::find_if(p.begin(), p.end(), NsmSession::FindByHandle(reinterpret_cast<NsmSession *>(wParam)));
1234- if (it == p.end())
1235+ if(it == p.end())
12351236 return 0;
12361237
12371238 g_NsmCom.CallService(g_NsmCom.GetService(format(NMS_PROTOCOL_SESSION_SENDMESSAGE, (*it)->Protocol.c_str())), wParam, lParam);
@@ -1241,7 +1242,7 @@
12411242 return 1;
12421243 }
12431244
1244- LONG_PTR Service::DoReceiveMessage(const WPARAM wParam,const LPARAM lParam)
1245+ LONG_PTR Service::DoReceiveMessage(WPARAM wParam, LPARAM lParam)
12451246 {
12461247 {
12471248 NsmThreadSessionList::ConstAutoLock lock(g_NsmSystem.Sessions);
@@ -1249,7 +1250,7 @@
12491250
12501251 NsmSessionList::const_iterator it =
12511252 std::find_if(p.begin(), p.end(), NsmSession::FindByHandle(reinterpret_cast<NsmSession *>(wParam)));
1252- if (it == p.end())
1253+ if(it == p.end())
12531254 return 0;
12541255 }
12551256
@@ -1259,7 +1260,7 @@
12591260
12601261 // FileSession ---------------------------------------------------------------------
12611262
1262- LONG_PTR Service::DoCreateFileSession(const WPARAM wParam,const LPARAM /* lParam */)
1263+ LONG_PTR Service::DoCreateFileSession(WPARAM wParam, LPARAM /* lParam */)
12631264 {
12641265 NsmFileSessionListSub result;
12651266 {
@@ -1269,7 +1270,7 @@
12691270 NsmSessionList::const_iterator it =
12701271 std::find_if(p.begin(), p.end(), NsmSession::FindByHandle(reinterpret_cast<NsmSession*>(wParam)));
12711272
1272- if (it == p.end())
1273+ if(it == p.end())
12731274 return 0;
12741275
12751276 NsmThreadFileSessionList::AutoLock lock2(g_NsmSystem.FileSessions);
@@ -1286,7 +1287,7 @@
12861287 return reinterpret_cast<LONG_PTR>(result.get());
12871288 }
12881289
1289- LONG_PTR Service::DoDeleteFileSession(const WPARAM wParam,const LPARAM /* lParam */)
1290+ LONG_PTR Service::DoDeleteFileSession(WPARAM wParam, LPARAM /* lParam */)
12901291 {
12911292 {
12921293 NsmThreadFileSessionList::AutoLock lock(g_NsmSystem.FileSessions);
@@ -1293,7 +1294,7 @@
12931294 NsmFileSessionList &p = lock.List();
12941295 NsmFileSessionList::iterator it
12951296 = std::find_if(p.begin(), p.end(), NsmFileSession::FindByHandle(reinterpret_cast<NsmFileSession *>(wParam)));
1296- if (it == p.end())
1297+ if(it == p.end())
12971298 return -1;
12981299
12991300 p.erase(it);
@@ -1304,20 +1305,20 @@
13041305 return 1;
13051306 }
13061307
1307- LONG_PTR Service::DoGetFileSessionInfo(const WPARAM wParam,const LPARAM lParam)
1308+ LONG_PTR Service::DoGetFileSessionInfo(WPARAM wParam, LPARAM lParam)
13081309 {
13091310 NsmThreadFileSessionList::ConstAutoLock lock(g_NsmSystem.FileSessions);
13101311 const NsmFileSessionList &p = lock.List();
13111312 NsmFileSessionList::const_iterator it =
13121313 std::find_if(p.begin(), p.end(), NsmFileSession::FindByHandle(reinterpret_cast<NsmFileSession *>(wParam)));
1313- if (it == p.end())
1314+ if(it == p.end())
13141315 return 0;
13151316
13161317 const NsmFileSession &session = *reinterpret_cast<NsmFileSession *>(wParam);
13171318 const PNsmFileSessionInfo pin = reinterpret_cast<PNsmFileSessionInfo>(lParam);
1318- switch (pin->nInfoKey)
1319+ switch(pin->nInfoKey)
13191320 {
1320- //TODO:PtrToNsmInfoが必要?
1321+ //TODO:PtrToNsmInfoが必要?
13211322 case NMFI_SESSION:
13221323 return Common::NsmInfoUtility::IntToNsmInfo(pin->lpInfo, reinterpret_cast<INT32>(session.Session));
13231324 case NMFI_PROTOCOL:
@@ -1340,7 +1341,7 @@
13401341 }
13411342 }
13421343
1343- LONG_PTR Service::DoSetFileSessionInfo(const WPARAM wParam,const LPARAM lParam)
1344+ LONG_PTR Service::DoSetFileSessionInfo(WPARAM wParam, LPARAM lParam)
13441345 {
13451346 {
13461347 NsmThreadFileSessionList::ConstAutoLock lock(g_NsmSystem.FileSessions);
@@ -1348,12 +1349,12 @@
13481349
13491350 NsmFileSessionList::const_iterator it =
13501351 std::find_if(p.begin(), p.end(), NsmFileSession::FindByHandle(reinterpret_cast<NsmFileSession *>(wParam)));
1351- if (it == p.end())
1352+ if(it == p.end())
13521353 return 0;
13531354
13541355 NsmFileSession &session = *reinterpret_cast<NsmFileSession *>(wParam);
13551356 const TNsmFileSessionInfo &pin = *reinterpret_cast<PNsmFileSessionInfo>(lParam);
1356- switch (pin.nInfoKey)
1357+ switch(pin.nInfoKey)
13571358 {
13581359 case NMFI_SESSION:
13591360 //ReadOnly
@@ -1385,12 +1386,12 @@
13851386 return 1;
13861387 }
13871388
1388- LONG_PTR Service::DoEnumFileSessions(const WPARAM wParam,const LPARAM lParam)
1389+ LONG_PTR Service::DoEnumFileSessions(WPARAM wParam, LPARAM lParam)
13891390 {
13901391 NsmThreadFileSessionList::ConstAutoLock lock(g_NsmSystem.FileSessions);
13911392 const NsmFileSessionList &p = lock.List();
13921393
1393- for(NsmFileSessionList::const_iterator it = p.begin();it != p.end();++it)
1394+ for(NsmFileSessionList::const_iterator it = p.begin(); it != p.end(); ++it)
13941395 reinterpret_cast<TEnumFileSessionCallback>(wParam)(reinterpret_cast<HNsmFileSession>(it->get()), lParam);
13951396
13961397 return 0;
@@ -1398,20 +1399,20 @@
13981399
13991400 // UIService ---------------------------------------------------------------------
14001401
1401- void Service::DoEnumService(const tstring &requiredService,const TEnumUIServiceInfo *const pin)
1402+ void Service::DoEnumService(const tstring &requiredService, const TEnumUIServiceInfo* pin)
14021403 {
14031404 NsmThreadServiceList::ConstAutoLock lock(g_NsmCom.ServiceList);
14041405 const NsmServiceList &p = lock.List();
14051406
1406- for (NsmServiceList::const_iterator it = p.begin(); it != p.end(); ++it)
1407+ for(NsmServiceList::const_iterator it = p.begin(); it != p.end(); ++it)
14071408 {
14081409 const tstring serviceName = it->first;
14091410
14101411 tstring::size_type pos = serviceName.rfind(TEXT('/'));
1411- if (pos == tstring::npos)
1412+ if(pos == tstring::npos)
14121413 continue;
14131414
1414- if (requiredService != serviceName.substr(0, pos))
1415+ if(requiredService != serviceName.substr(0, pos))
14151416 continue;
14161417
14171418 pin->lpCallBackProc(t2c(serviceName).c_str(), pin->nData);
@@ -1420,7 +1421,7 @@
14201421
14211422 //-----------------------------------------------------------------------------------------------
14221423
1423- LONG_PTR Service::DoEnumConnectionUIService(const tstring &wParam,const LPARAM lParam,const LPCTSTR main)
1424+ LONG_PTR Service::DoEnumConnectionUIService(const tstring &wParam, LPARAM lParam, LPCTSTR main)
14241425 {
14251426 const tstring requiredService = format(main, wParam.c_str());
14261427 DoEnumService(requiredService, reinterpret_cast<PEnumUIServiceInfo>(lParam));
@@ -1427,32 +1428,32 @@
14271428 return 0;
14281429 }
14291430
1430- LONG_PTR Service::DoEnumConnectionUIServiceMain(const WPARAM wParam,const LPARAM lParam)
1431+ LONG_PTR Service::DoEnumConnectionUIServiceMain(WPARAM wParam, LPARAM lParam)
14311432 {
14321433 return DoEnumConnectionUIService(reinterpret_cast<NsmConnection *>(wParam)->Protocol, lParam, NMD_PROTOCOL_CONNECTION_UISERVICE_MAIN);
14331434 }
14341435
1435- LONG_PTR Service::DoEnumConnectionUIServiceMember(const WPARAM wParam,const LPARAM lParam)
1436+ LONG_PTR Service::DoEnumConnectionUIServiceMember(WPARAM wParam, LPARAM lParam)
14361437 {
14371438 return DoEnumConnectionUIService(reinterpret_cast<NsmConnection *>(wParam)->Protocol, lParam, NMD_PROTOCOL_CONNECTION_UISERVICE_MEMBER);
14381439 }
14391440
1440- LONG_PTR Service::DoEnumConnectionUIServiceGroup(const WPARAM wParam,const LPARAM lParam)
1441+ LONG_PTR Service::DoEnumConnectionUIServiceGroup(WPARAM wParam, LPARAM lParam)
14411442 {
14421443 return DoEnumConnectionUIService(reinterpret_cast<NsmConnection *>(wParam)->Protocol, lParam, NMD_PROTOCOL_CONNECTION_UISERVICE_GROUP);
14431444 }
14441445
1445- LONG_PTR Service::DoEnumSessionUIServiceMain(const WPARAM wParam,const LPARAM lParam)
1446+ LONG_PTR Service::DoEnumSessionUIServiceMain(WPARAM wParam, LPARAM lParam)
14461447 {
14471448 return DoEnumConnectionUIService(reinterpret_cast<NsmSession *>(wParam)->Protocol, lParam, NMD_PROTOCOL_SESSION_UISERVICE_MAIN);
14481449 }
14491450
1450- LONG_PTR Service::DoEnumSessionUIServiceMember(const WPARAM wParam,const LPARAM lParam)
1451+ LONG_PTR Service::DoEnumSessionUIServiceMember(WPARAM wParam, LPARAM lParam)
14511452 {
14521453 return DoEnumConnectionUIService(reinterpret_cast<NsmSession *>(wParam)->Protocol, lParam, NMD_PROTOCOL_SESSION_UISERVICE_MEMBER);
14531454 }
14541455
1455- LONG_PTR Service::DoEnumFileSessionUIServiceMain(const WPARAM wParam,const LPARAM lParam)
1456+ LONG_PTR Service::DoEnumFileSessionUIServiceMain(WPARAM wParam, LPARAM lParam)
14561457 {
14571458 return DoEnumConnectionUIService(reinterpret_cast<NsmFileSession *>(wParam)->Protocol, lParam, NMD_PROTOCOL_FILESESSION_UISERVICE_MAIN);
14581459 }
@@ -1459,15 +1460,15 @@
14591460
14601461 //-----------------------------------------------------------------------------------------------
14611462
1462- LONG_PTR Service::DoEnumAddInUIService(const WPARAM ,const LPARAM lParam,const LPCTSTR main)
1463+ LONG_PTR Service::DoEnumAddInUIService(WPARAM /* wParam */, LPARAM lParam, LPCTSTR main)
14631464 {
14641465 const TEnumUIServiceInfo *const pin = reinterpret_cast<PEnumUIServiceInfo>(lParam);
14651466
14661467 const NsmPluginList &p = g_NsmSystem.Plugins;
1467- for(NsmPluginList::const_iterator it = p.begin();it != p.end();++it)
1468+ for(NsmPluginList::const_iterator it = p.begin(); it != p.end(); ++it)
14681469 {
14691470 const tstring moduleName = (*it)->PluginInfo.ModuleName;
1470- if (Common::ModuleUtility::ExtractModuleType(moduleName) == NMM_ADDIN)
1471+ if(Common::ModuleUtility::ExtractModuleType(moduleName) == NMM_ADDIN)
14711472 {
14721473 const tstring requiredService = format(main, Common::ModuleUtility::ExtractAddInName(moduleName).c_str());
14731474 DoEnumService(requiredService, pin);
@@ -1477,39 +1478,39 @@
14771478 return 0;
14781479 }
14791480
1480- LONG_PTR Service::DoEnumAddInUIServiceMain(const WPARAM wParam,const LPARAM lParam)
1481+ LONG_PTR Service::DoEnumAddInUIServiceMain(WPARAM wParam, LPARAM lParam)
14811482 {
1482- return DoEnumAddInUIService(wParam,lParam,NMD_ADDIN_UISERVICE_MAIN);
1483+ return DoEnumAddInUIService(wParam, lParam, NMD_ADDIN_UISERVICE_MAIN);
14831484 }
14841485
1485- LONG_PTR Service::DoEnumAddInUIServiceMember(const WPARAM wParam,const LPARAM lParam)
1486+ LONG_PTR Service::DoEnumAddInUIServiceMember(WPARAM wParam, LPARAM lParam)
14861487 {
1487- return DoEnumAddInUIService(wParam,lParam,NMD_ADDIN_UISERVICE_MEMBER);
1488+ return DoEnumAddInUIService(wParam, lParam, NMD_ADDIN_UISERVICE_MEMBER);
14881489 }
14891490
1490- LONG_PTR Service::DoEnumAddInUIServiceGroup(const WPARAM wParam,const LPARAM lParam)
1491+ LONG_PTR Service::DoEnumAddInUIServiceGroup(WPARAM wParam, LPARAM lParam)
14911492 {
1492- return DoEnumAddInUIService(wParam,lParam,NMD_ADDIN_UISERVICE_GROUP);
1493+ return DoEnumAddInUIService(wParam, lParam, NMD_ADDIN_UISERVICE_GROUP);
14931494 }
14941495
1495- LONG_PTR Service::DoEnumAddInUIServiceTab(const WPARAM wParam,const LPARAM lParam)
1496+ LONG_PTR Service::DoEnumAddInUIServiceTab(WPARAM wParam, LPARAM lParam)
14961497 {
1497- return DoEnumAddInUIService(wParam,lParam,NMD_ADDIN_UISERVICE_TAB);
1498+ return DoEnumAddInUIService(wParam, lParam, NMD_ADDIN_UISERVICE_TAB);
14981499 }
14991500
1500- LONG_PTR Service::DoEnumAddInUIServiceSessionMain(const WPARAM wParam,const LPARAM lParam)
1501+ LONG_PTR Service::DoEnumAddInUIServiceSessionMain(WPARAM wParam, LPARAM lParam)
15011502 {
1502- return DoEnumAddInUIService(wParam,lParam,NMD_ADDIN_UISERVICE_SESSION_MAIN);
1503+ return DoEnumAddInUIService(wParam, lParam, NMD_ADDIN_UISERVICE_SESSION_MAIN);
15031504 }
15041505
1505- LONG_PTR Service::DoEnumAddInUIServiceSessionMember(const WPARAM wParam,const LPARAM lParam)
1506+ LONG_PTR Service::DoEnumAddInUIServiceSessionMember(WPARAM wParam, LPARAM lParam)
15061507 {
1507- return DoEnumAddInUIService(wParam,lParam,NMD_ADDIN_UISERVICE_SESSION_MEMBER);
1508+ return DoEnumAddInUIService(wParam, lParam, NMD_ADDIN_UISERVICE_SESSION_MEMBER);
15081509 }
15091510
1510- LONG_PTR Service::DoEnumAddInUIServiceFileSessionMain(const WPARAM wParam,const LPARAM lParam)
1511+ LONG_PTR Service::DoEnumAddInUIServiceFileSessionMain(WPARAM wParam, LPARAM lParam)
15111512 {
1512- return DoEnumAddInUIService(wParam,lParam,NMD_ADDIN_UISERVICE_FILESESSION_MAIN);
1513+ return DoEnumAddInUIService(wParam, lParam, NMD_ADDIN_UISERVICE_FILESESSION_MAIN);
15131514 }
15141515
15151516 //--------------------------------------------------------
@@ -1519,7 +1520,7 @@
15191520 // NMS_SYSTEM_MODULES_REINITIALIZEPLUGINS(ヘッダ未定義)処理関数
15201521 // プラグインの再読み込みだから無くてもいいかな。
15211522 // 仕様自体が動的読み込みするようにできてないし。
1522- LONG_PTR Service::DoReInitializePlugins(const WPARAM /* wParam */,const LPARAM /* lParam */)
1523+ LONG_PTR Service::DoReInitializePlugins(WPARAM /* wParam */, LPARAM /* lParam */)
15231524 {
15241525 if(!g_NsmSystem.HModulesLoaded)
15251526 return 0;
@@ -1555,13 +1556,13 @@
15551556 // NMS_SYSTEM_RESTART(ヘッダ未定義)処理関数
15561557 // こっちは再起動関数。
15571558 // 独自拡張だし切ってもいいと思う。
1558- LONG_PTR Service::DoRestart(const WPARAM /* wParam */,const LPARAM /* lParam */)
1559+ LONG_PTR Service::DoRestart(WPARAM /* wParam */, LPARAM /* lParam */)
15591560 {
1560- TCHAR currentDir[MAX_PATH];
1561- GetCurrentDirectory(ARRAYSIZE(currentDir),currentDir);
1561+ std::array<TCHAR, MAX_PATH> currentDir;
1562+ GetCurrentDirectory(std::tuple_size<decltype(currentDir)>::value, currentDir.data());
15621563
1563- ShellExecute(NULL,NULL,Application::ExeName().c_str(),CommandLineOption::Restart,currentDir,SW_SHOWDEFAULT);
1564- DoExit(0,0);
1564+ ShellExecute(NULL, NULL, Application::ExeName().c_str(), CommandLineOption::Restart, currentDir.data(), SW_SHOWDEFAULT);
1565+ DoExit(0, 0);
15651566
15661567 return 0;
15671568 }
--- trunk/nsmsgs/src/UFrmNsmMain.cpp (revision 118)
+++ trunk/nsmsgs/src/UFrmNsmMain.cpp (revision 119)
@@ -33,7 +33,7 @@
3333 wc.cbSize = sizeof(wc);
3434 wc.lpszClassName = TEXT("NsmMain");
3535 wc.lpfnWndProc = WndProc;
36- wc.hInstance = static_cast<HINSTANCE>(GetModuleHandle(nullptr));
36+ wc.hInstance = static_cast<HINSTANCE>(GetModuleHandle(NULL));
3737
3838 RegisterClassEx(&wc);
3939
--- trunk/nsmsgs/src/UNsmPlugin.cpp (revision 118)
+++ trunk/nsmsgs/src/UNsmPlugin.cpp (revision 119)
@@ -1,8 +1,6 @@
11 #include "UNsmPlugin.h"
22
3-#if !defined(_WINDOWS)
4-#include <iostream>
5-#endif
3+#include <array>
64
75 #include "../../Common/UNsmConsts.h"
86 #include "../../Common/dummy.h"
@@ -36,9 +34,9 @@
3634 return;
3735
3836 #if defined(_WINDOWS)
39- TCHAR buf[MAX_PATH];
40- if(GetModuleFileName(DllHandle, buf, ARRAYSIZE(buf)))
41- FileName = buf;
37+ std::array<TCHAR, MAX_PATH> buf;
38+ if(GetModuleFileName(DllHandle, buf.data(), std::tuple_size<decltype(buf)>::value))
39+ FileName = buf.data();
4240 else
4341 FileName = filePath;
4442 #else
@@ -88,11 +86,11 @@
8886
8987 tstring NsmPlugin::GetPluginInfoEx(int infoNo) const
9088 {
91- char buf[256];
92- if(0 < GetPluginInfo(infoNo, buf, sizeof(buf)))
93- return c2t(buf);
89+ std::array<char, 256> buf;
90+ if(0 < GetPluginInfo(infoNo, buf.data(), std::tuple_size<decltype(buf)>::value))
91+ return c2t(buf.data());
9492 else
95- return TEXT("");
93+ return tstring();
9694 }
9795
9896 int NsmPlugin::Initialize(PNsmPluginInitInfo lpPluginInitInfo) const
--- trunk/nsmsgs/src/UFrmNsmMainDebug.cpp (revision 118)
+++ trunk/nsmsgs/src/UFrmNsmMainDebug.cpp (revision 119)
@@ -53,13 +53,13 @@
5353 }
5454
5555 // 二段階目の初期化
56- NsmMainDebug::NsmMainDebug(HWND hParent)
56+ NsmMainDebug::NsmMainDebug()
5757 {
5858 #if defined(WINCE)
59- WNDCLASS wc = {0};
59+ WNDCLASS wc = {};
6060 #else
61- WNDCLASSEX wc = {0};
62- wc.cbSize = sizeof(WNDCLASSEX);
61+ WNDCLASSEX wc = {};
62+ wc.cbSize = sizeof(wc);
6363 #endif
6464 wc.lpszClassName = TEXT("NsmMainDebug");
6565 wc.lpfnWndProc = DebugWndProc;
@@ -85,9 +85,9 @@
8585 CW_USEDEFAULT, CW_USEDEFAULT,
8686 WindowWidth,
8787 WindowHeight,
88- hParent,
8988 NULL,
9089 NULL,
90+ NULL,
9191 this);
9292
9393 UpdateWindow(Handle);
@@ -128,10 +128,9 @@
128128
129129 SetWindowSubclass(hwnd, DebugSubProc, reinterpret_cast<UINT_PTR>(hwnd), reinterpret_cast<DWORD_PTR>(parent));
130130
131- LVCOLUMN lvcol = {0};
131+ LVCOLUMN lvcol = {};
132132 lvcol.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;
133133 lvcol.fmt = LVCFMT_LEFT;
134- lvcol.iSubItem = 0;
135134
136135 for(TabChildParam::const_iterator it = param.begin(); it != param.end(); ++lvcol.iSubItem, ++it)
137136 {
@@ -161,7 +160,7 @@
161160
162161 void NsmMainDebug::AdjustTabChild() const
163162 {
164- RECT rc = {0};
163+ RECT rc = {};
165164 GetClientRect(TabHandle, &rc);
166165 TabCtrl_AdjustRect(TabHandle, FALSE, &rc);
167166
@@ -188,7 +187,7 @@
188187
189188 SetWindowSubclass(TabHandle, DebugSubProc, reinterpret_cast<UINT_PTR>(TabHandle), reinterpret_cast<DWORD_PTR>(hwnd));
190189
191- TCITEM tcItem = {0};
190+ TCITEM tcItem = {};
192191 tcItem.mask = TCIF_TEXT;
193192 tcItem.pszText = const_cast<LPTSTR>(TEXT("Modules"));
194193 TabCtrl_InsertItem(TabHandle, 0, &tcItem);
--- trunk/nsmsgs/src/UNsmSystem.h (revision 118)
+++ trunk/nsmsgs/src/UNsmSystem.h (revision 119)
@@ -55,17 +55,17 @@
5555 NsmThreadFileSessionList FileSessions;
5656 NsmPluginList Plugins;
5757 //---
58- void(NsmMainDebug::*OnConnectionChange)() const;
59- void(NsmMainDebug::*OnSessionChange)() const;
60- void(NsmMainDebug::*OnModuleChange)() const;
61- void(*OnFileSessionChange)(void*); //TODO:未実装
58+ void (NsmMainDebug::*OnConnectionChange)() const;
59+ void (NsmMainDebug::*OnSessionChange)() const;
60+ void (NsmMainDebug::*OnModuleChange)() const;
61+ void (*OnFileSessionChange)(void*); //TODO:未実装
6262
6363 //---
6464 int Initialize();
6565 int Terminate();
66- void CloseRelatedSessions(const NsmConnection *const connection);
66+ void CloseRelatedSessions(const NsmConnection* connection);
6767 void CloseAllSession();
68- void CloseRelatedFileSessions(const NsmSession *const session);
68+ void CloseRelatedFileSessions(const NsmSession* session);
6969 void CloseAllFileSession();
7070 void DisconnectAll();
7171
@@ -76,9 +76,9 @@
7676 class Service
7777 {
7878 private:
79- static void DoEnumService(const tstring &requiredService,const TEnumUIServiceInfo *const pin);
80- static LONG_PTR DoEnumConnectionUIService(const tstring &wParam,const LPARAM lParam,const LPCTSTR main);
81- static LONG_PTR DoEnumAddInUIService(const WPARAM /*wParam */ ,const LPARAM lParam,const LPCTSTR main);
79+ static void DoEnumService(const tstring &requiredService, const TEnumUIServiceInfo* pin);
80+ static LONG_PTR DoEnumConnectionUIService(const tstring &wParam, LPARAM lParam, LPCTSTR main);
81+ static LONG_PTR DoEnumAddInUIService(WPARAM /* wParam */, LPARAM lParam, LPCTSTR main);
8282 public:
8383
8484 // -----------------------------------------------------------------------------
@@ -86,27 +86,27 @@
8686 // wParam : 0
8787 // lParam : 0
8888 // Return : 0
89- static LONG_PTR __stdcall DoExit(const WPARAM /* wParam */,const LPARAM /* lParam */);
89+ static LONG_PTR __stdcall DoExit(WPARAM /* wParam */, LPARAM /* lParam */);
9090
9191 // wParam : LPSTR
9292 // lParam : 0
9393 // Return : 0
94- static LONG_PTR __stdcall DoDebugPrint(const WPARAM wParam,const LPARAM /* lParam */);
94+ static LONG_PTR __stdcall DoDebugPrint(WPARAM wParam, LPARAM /* lParam */);
9595
9696 // wParam : TEnumProtocolCallback
9797 // lParam : 任意データ
9898 // Return : 0
99- static LONG_PTR __stdcall DoEnumProtocols(const WPARAM wParam,const LPARAM lParam);
99+ static LONG_PTR __stdcall DoEnumProtocols(WPARAM wParam, LPARAM lParam);
100100
101101 // wParam : TEnumModuleCallback
102102 // lParam : 任意データ
103103 // Return : 0
104- static LONG_PTR __stdcall DoEnumModules(const WPARAM wParam,const LPARAM lParam);
104+ static LONG_PTR __stdcall DoEnumModules(WPARAM wParam, LPARAM lParam);
105105
106106 // wParam : LPPLUGININFO
107107 // lParam : 0
108108 // Return : 実際に lpBuffer に書き込んだ文字数
109- static LONG_PTR __stdcall DoGetPluginInfo(const WPARAM wParam,const LPARAM /* lParam */);
109+ static LONG_PTR __stdcall DoGetPluginInfo(WPARAM wParam, LPARAM /* lParam */);
110110
111111 // Connection ------------------------------------------------------------------
112112
@@ -113,27 +113,27 @@
113113 // wParam : LPSTR プロトコル名
114114 // lParam : LPSTR 作成するコネクションのキャプション
115115 // Return : 成功したら HNsmConnection 失敗したら 0 を返す
116- static LONG_PTR __stdcall DoCreateConnection(const WPARAM wParam,const LPARAM lParam);
116+ static LONG_PTR __stdcall DoCreateConnection(WPARAM wParam, LPARAM lParam);
117117
118118 // wParam : 対象 HNsmConnection
119119 // lParam : 0
120120 // Return : 成功したら -1 以外を返す
121- static LONG_PTR __stdcall DoDeleteConnection(const WPARAM wParam,const LPARAM /* lParam */ );
121+ static LONG_PTR __stdcall DoDeleteConnection(WPARAM wParam, LPARAM /* lParam */);
122122
123123 // wParam : 対象 HNsmConnection
124124 // lParam : PNsmConnectionInfo
125125 // Return : 実際に書き込んだバッファサイズ
126- static LONG_PTR __stdcall DoGetConnectionInfo(const WPARAM wParam,const LPARAM lParam);
126+ static LONG_PTR __stdcall DoGetConnectionInfo(WPARAM wParam, LPARAM lParam);
127127
128128 // wParam : 対象 HNsmConnection
129129 // lParam : PNsmConnectionInfo
130130 // Return : 成功したら 0 以外を返す
131- static LONG_PTR __stdcall DoSetConnectionInfo(const WPARAM wParam,const LPARAM lParam);
131+ static LONG_PTR __stdcall DoSetConnectionInfo(WPARAM wParam, LPARAM lParam);
132132
133133 // wParam : TEnumConnectionCallback コールバック関数へのポインタ
134134 // lParam : コールバック関数に渡す任意データ
135135 // Return : 0
136- static LONG_PTR __stdcall DoEnumConnections(const WPARAM wParam,const LPARAM lParam);
136+ static LONG_PTR __stdcall DoEnumConnections(WPARAM wParam, LPARAM lParam);
137137
138138 // -----------------------------------------------------------------------------
139139
@@ -140,31 +140,31 @@
140140 // wParam : 対象 HNsmConnection
141141 // lParam : PAddMemberInfo
142142 // Return : 成功したら 0 以外を返す
143- static LONG_PTR __stdcall DoAddMember(const WPARAM wParam,const LPARAM lParam);
143+ static LONG_PTR __stdcall DoAddMember(WPARAM wParam, LPARAM lParam);
144144
145145 // wParam : 対象 HNsmConnection
146146 // lParam : PRemoveMemberInfo
147147 // Return : 成功したら 0 以外を返す
148- static LONG_PTR __stdcall DoRemoveMember(const WPARAM wParam,const LPARAM lParam);
148+ static LONG_PTR __stdcall DoRemoveMember(WPARAM wParam, LPARAM lParam);
149149
150150 // wParam : 対象 HNsmConnection
151151 // lParam : PNsmMemberInfo
152152 // Return : 成功したら 0 以外を返す
153- static LONG_PTR __stdcall DoSetMemberInfo(const WPARAM wParam,const LPARAM lParam);
153+ static LONG_PTR __stdcall DoSetMemberInfo(WPARAM wParam, LPARAM lParam);
154154
155155 // wParam : 対象 HNsmConnection
156156 // lParam : PNsmMemberInfo
157157 // Return : 実際に lpBuffer に書き込んだサイズ
158- static LONG_PTR __stdcall DoGetMemberInfo(const WPARAM wParam,const LPARAM lParam);
158+ static LONG_PTR __stdcall DoGetMemberInfo(WPARAM wParam, LPARAM lParam);
159159
160160 // wParam : 対象 HNsmConnection
161161 // lParam : PEnumMemberInfo
162162 // Return : 0
163- static LONG_PTR __stdcall DoEnumMembers(const WPARAM wParam,const LPARAM lParam);
163+ static LONG_PTR __stdcall DoEnumMembers(WPARAM wParam, LPARAM lParam);
164164
165- static LONG_PTR __stdcall DoBeginUpdate(const WPARAM /* wParam */ ,const LPARAM /* lParam */ );
165+ static LONG_PTR __stdcall DoBeginUpdate(WPARAM /* wParam */, LPARAM /* lParam */);
166166
167- static LONG_PTR __stdcall DoEndUpdate(const WPARAM /* wParam */ ,const LPARAM /* lParam */ );
167+ static LONG_PTR __stdcall DoEndUpdate(WPARAM /* wParam */, LPARAM /* lParam */);
168168
169169 // Group -----------------------------------------------------------------------
170170
@@ -171,37 +171,37 @@
171171 // wParam : ConnectionID
172172 // lParam : GroupID
173173 // Return : 成功したら 0 以外を返す
174- static LONG_PTR __stdcall DoAddGroup(const WPARAM wParam,const LPARAM lParam);
174+ static LONG_PTR __stdcall DoAddGroup(WPARAM wParam, LPARAM lParam);
175175
176176 // wParam : ConnectionID
177177 // lParam : GroupID
178178 // Return : 失敗したら 0 成功したら 1
179- static LONG_PTR __stdcall DoRemoveGroup(const WPARAM wParam,const LPARAM lParam);
179+ static LONG_PTR __stdcall DoRemoveGroup(WPARAM wParam, LPARAM lParam);
180180
181181 // wParam : HConnection
182182 // lParam : PNsmGroupInfo
183183 // Return : 失敗したら 0 成功したら 1
184- static LONG_PTR __stdcall DoSetGroupInfo(const WPARAM wParam,const LPARAM lParam);
184+ static LONG_PTR __stdcall DoSetGroupInfo(WPARAM wParam, LPARAM lParam);
185185
186186 // wParam : ConnectionID
187187 // lParam : PNsmGroupInfo
188188 // Return : 設定したバイト数
189- static LONG_PTR __stdcall DoGetGroupInfo(const WPARAM wParam,const LPARAM lParam);
189+ static LONG_PTR __stdcall DoGetGroupInfo(WPARAM wParam, LPARAM lParam);
190190
191191 // wParam : HNsmConnection
192192 // lParam : PEnumGroupInfo
193193 // Return : 0
194- static LONG_PTR __stdcall DoEnumGroups(const WPARAM wParam,const LPARAM lParam);
194+ static LONG_PTR __stdcall DoEnumGroups(WPARAM wParam, LPARAM lParam);
195195
196196 // wParam : 親HNsmConnection
197197 // lParam : 0
198198 // Return : 0
199- static LONG_PTR __stdcall DoBeginGroupsUpdate(const WPARAM /* wParam */,const LPARAM /* lParam */);
199+ static LONG_PTR __stdcall DoBeginGroupsUpdate(WPARAM /* wParam */, LPARAM /* lParam */);
200200
201201 // wParam : 親HNsmConnection
202202 // lParam : 0
203203 // Return : 0
204- static LONG_PTR __stdcall DoEndGroupsUpdate(const WPARAM /* wParam */,const LPARAM /* lParam */);
204+ static LONG_PTR __stdcall DoEndGroupsUpdate(WPARAM /* wParam */, LPARAM /* lParam */);
205205
206206 // Session ---------------------------------------------------------------------
207207
@@ -208,63 +208,63 @@
208208 // wParam : 親HNsmConnection
209209 // lParam : 0
210210 // Return : 成功したら HNsmSession 、失敗したら 0
211- static LONG_PTR __stdcall DoCreateSession(const WPARAM wParam,const LPARAM lParam);
211+ static LONG_PTR __stdcall DoCreateSession(WPARAM wParam, LPARAM lParam);
212212
213213 // wParam : 削除する HNsmSession
214214 // lParam : 0
215215 // Return : 成功すれば -1 以外の数値
216- static LONG_PTR __stdcall DoDeleteSession(const WPARAM wParam,const LPARAM /* lParam */);
216+ static LONG_PTR __stdcall DoDeleteSession(WPARAM wParam, LPARAM /* lParam */);
217217
218218 // wParam : 対象 HNsmSession
219219 // lParam : PSessionInfo
220220 // Return : 実際に lpBuffer に格納した情報のサイズ
221- static LONG_PTR __stdcall DoGetSessionInfo(const WPARAM wParam,const LPARAM lParam);
221+ static LONG_PTR __stdcall DoGetSessionInfo(WPARAM wParam, LPARAM lParam);
222222
223223 // wParam : 対象 HNsmSession
224224 // lParam : PSessionInfo
225225 // Return : 成功したら 0 以外を返す
226- static LONG_PTR __stdcall DoSetSessionInfo(const WPARAM wParam,const LPARAM lParam);
226+ static LONG_PTR __stdcall DoSetSessionInfo(WPARAM wParam, LPARAM lParam);
227227
228228 // wParam : コールバック関数へのポインタ
229229 // lParam : コールバック関数に渡す任意データ
230230 // Return : 0
231- static LONG_PTR __stdcall DoEnumSessions(const WPARAM wParam,const LPARAM lParam);
231+ static LONG_PTR __stdcall DoEnumSessions(WPARAM wParam, LPARAM lParam);
232232
233233 // wParam : セッション識別子
234234 // lParam : PChar メンバのアカウント
235235 // Return : 成功したら 0 以外を返す
236- static LONG_PTR __stdcall DoAddSessionMember(const WPARAM wParam,const LPARAM lParam);
236+ static LONG_PTR __stdcall DoAddSessionMember(WPARAM wParam, LPARAM lParam);
237237
238238 // wParam : セッション識別子
239239 // lParam : PChar メンバのアカウント
240240 // Return : 成功したら 0 以外を返す
241- static LONG_PTR __stdcall DoRemoveSessionMember(const WPARAM wParam,const LPARAM lParam);
241+ static LONG_PTR __stdcall DoRemoveSessionMember(WPARAM wParam, LPARAM lParam);
242242
243243 // wParam : SessionID
244244 // lParam : PMemberInfo
245245 // Return : 成功すれば 0 以外を返す
246- static LONG_PTR __stdcall DoSetSessionMemberInfo(const WPARAM wParam,const LPARAM lParam);
246+ static LONG_PTR __stdcall DoSetSessionMemberInfo(WPARAM wParam, LPARAM lParam);
247247
248248 // wParam : SessionID
249249 // lParam : PMemberInfo
250250 // Return : 成功すれば 0 以外を返す
251- static LONG_PTR __stdcall DoGetSessionMemberInfo(const WPARAM wParam,const LPARAM lParam);
251+ static LONG_PTR __stdcall DoGetSessionMemberInfo(WPARAM wParam, LPARAM lParam);
252252
253- static LONG_PTR __stdcall DoBeginSessionMembersUpdate(const WPARAM /* wParam */,const LPARAM /* lParam */);
253+ static LONG_PTR __stdcall DoBeginSessionMembersUpdate(WPARAM /* wParam */, LPARAM /* lParam */);
254254
255- static LONG_PTR __stdcall DoEndSessionMembersUpdate(const WPARAM /* wParam */,const LPARAM /* lParam */);
255+ static LONG_PTR __stdcall DoEndSessionMembersUpdate(WPARAM /* wParam */, LPARAM /* lParam */);
256256
257- static LONG_PTR __stdcall DoEnumSessionMembers(const WPARAM wParam,const LPARAM lParam);
257+ static LONG_PTR __stdcall DoEnumSessionMembers(WPARAM wParam, LPARAM lParam);
258258
259259 // wParam : SessionID
260260 // lParam : LPMESSAGEINFO
261261 // Return : 成功すれば 0 以外を返す
262- static LONG_PTR __stdcall DoSendMessage(const WPARAM wParam,const LPARAM lParam);
262+ static LONG_PTR __stdcall DoSendMessage(WPARAM wParam, LPARAM lParam);
263263
264264 // wParam : SessionID
265265 // lParam : LPMESSAGEINFO
266266 // Return : 成功すれば 0 以外を返す
267- static LONG_PTR __stdcall DoReceiveMessage(const WPARAM wParam,const LPARAM lParam);
267+ static LONG_PTR __stdcall DoReceiveMessage(WPARAM wParam, LPARAM lParam);
268268
269269 // FileSession --------------------------------------------------------
270270
@@ -271,27 +271,27 @@
271271 // wParam : 親HNsmSession
272272 // lParam : 0
273273 // Return : 成功したら HNsmFileSession 、失敗したら 0
274- static LONG_PTR __stdcall DoCreateFileSession(const WPARAM wParam,const LPARAM lParam);
274+ static LONG_PTR __stdcall DoCreateFileSession(WPARAM wParam, LPARAM lParam);
275275
276276 // wParam : 削除する HNsmFileSession
277277 // lParam : 0
278278 // Return : 成功すれば -1 以外の数値
279- static LONG_PTR __stdcall DoDeleteFileSession(const WPARAM wParam,const LPARAM lParam);
279+ static LONG_PTR __stdcall DoDeleteFileSession(WPARAM wParam, LPARAM lParam);
280280
281281 // wParam : 対象 HNsmFileSession
282282 // lParam : PFileSessionInfo
283283 // Return : 実際に lpBuffer に格納した情報のサイズ
284- static LONG_PTR __stdcall DoGetFileSessionInfo(const WPARAM wParam,const LPARAM lParam);
284+ static LONG_PTR __stdcall DoGetFileSessionInfo(WPARAM wParam, LPARAM lParam);
285285
286286 // wParam : 対象 HNsmFileSession
287287 // lParam : PFileSessionInfo
288288 // Return : 成功したら 0 以外を返す
289- static LONG_PTR __stdcall DoSetFileSessionInfo(const WPARAM wParam,const LPARAM lParam);
289+ static LONG_PTR __stdcall DoSetFileSessionInfo(WPARAM wParam, LPARAM lParam);
290290
291291 // wParam : コールバック関数へのポインタ
292292 // lParam : コールバック関数に渡す任意データ
293293 // Return : 0
294- static LONG_PTR __stdcall DoEnumFileSessions(const WPARAM wParam,const LPARAM lParam);
294+ static LONG_PTR __stdcall DoEnumFileSessions(WPARAM wParam, LPARAM lParam);
295295
296296 // UIService --------------------------------------------------------
297297
@@ -299,37 +299,37 @@
299299 // wParam : ConnectionID
300300 // lParam : PEnumUIServiceInfo
301301 // Return : 0
302- static LONG_PTR __stdcall DoEnumConnectionUIServiceMain(const WPARAM wParam,const LPARAM lParam);
302+ static LONG_PTR __stdcall DoEnumConnectionUIServiceMain(WPARAM wParam, LPARAM lParam);
303303
304304 // SYSTEM_CONNECTION_UISERVICE_MEMBER_ENUM
305305 // wParam : ConnectionID
306306 // lParam : PEnumUIServiceInfo
307307 // Return : 0
308- static LONG_PTR __stdcall DoEnumConnectionUIServiceMember(const WPARAM wParam,const LPARAM lParam);
308+ static LONG_PTR __stdcall DoEnumConnectionUIServiceMember(WPARAM wParam, LPARAM lParam);
309309
310310 // SYSTEM_CONNECTION_UISERVICE_GROUP_ENUM
311311 // wParam : ConnectionID
312312 // lParam : PEnumUIServiceInfo
313313 // Return : 0
314- static LONG_PTR __stdcall DoEnumConnectionUIServiceGroup(const WPARAM wParam,const LPARAM lParam);
314+ static LONG_PTR __stdcall DoEnumConnectionUIServiceGroup(WPARAM wParam, LPARAM lParam);
315315
316316 // SYSTEM_SESSION_UISERVICE_MAIN_ENUM
317317 // wParam : HNsmSession
318318 // lParam : PEnumUIServiceInfo
319319 // Return : 0
320- static LONG_PTR __stdcall DoEnumSessionUIServiceMain(const WPARAM wParam,const LPARAM lParam);
320+ static LONG_PTR __stdcall DoEnumSessionUIServiceMain(WPARAM wParam, LPARAM lParam);
321321
322322 // SYSTEM_SESSION_UISERVICE_MEMBER_ENUM
323323 // wParam : HNsmSession
324324 // lParam : PEnumUIServiceInfo
325325 // Return : 0
326- static LONG_PTR __stdcall DoEnumSessionUIServiceMember(const WPARAM wParam,const LPARAM lParam);
326+ static LONG_PTR __stdcall DoEnumSessionUIServiceMember(WPARAM wParam, LPARAM lParam);
327327
328328 // SYSTEM_FILESESSION_UISERVICE_MAIN_ENUM
329329 // wParam : HNsmFileSession
330330 // lParam : PEnumUIServiceInfo
331331 // Return : 0
332- static LONG_PTR __stdcall DoEnumFileSessionUIServiceMain(const WPARAM wParam,const LPARAM lParam);
332+ static LONG_PTR __stdcall DoEnumFileSessionUIServiceMain(WPARAM wParam, LPARAM lParam);
333333
334334 //--------------------------------------------------------
335335
@@ -337,43 +337,43 @@
337337 // wParam : 0
338338 // lParam : PEnumUIServiceInfo
339339 // Return : 0
340- static LONG_PTR __stdcall DoEnumAddInUIServiceMain(const WPARAM wParam,const LPARAM lParam);
340+ static LONG_PTR __stdcall DoEnumAddInUIServiceMain(WPARAM wParam, LPARAM lParam);
341341
342342 // SYSTEM_ADDIN_UISERVICE_MEMBER_ENUM
343343 // wParam : 0
344344 // lParam : PEnumUIServiceInfo
345345 // Return : 0
346- static LONG_PTR __stdcall DoEnumAddInUIServiceMember(const WPARAM wParam,const LPARAM lParam);
346+ static LONG_PTR __stdcall DoEnumAddInUIServiceMember(WPARAM wParam, LPARAM lParam);
347347
348348 // SYSTEM_ADDIN_UISERVICE_GROUP_ENUM
349349 // wParam : 0
350350 // lParam : PEnumUIServiceInfo
351351 // Return : 0
352- static LONG_PTR __stdcall DoEnumAddInUIServiceGroup(const WPARAM wParam,const LPARAM lParam);
352+ static LONG_PTR __stdcall DoEnumAddInUIServiceGroup(WPARAM wParam, LPARAM lParam);
353353
354354 // SYSTEM_ADDIN_UISERVICE_TAB_ENUM
355355 // wParam : 0
356356 // lParam : PEnumUIServiceInfo
357357 // Return : 0
358- static LONG_PTR __stdcall DoEnumAddInUIServiceTab(const WPARAM wParam,const LPARAM lParam);
358+ static LONG_PTR __stdcall DoEnumAddInUIServiceTab(WPARAM wParam, LPARAM lParam);
359359
360360 // SYSTEM_ADDIN_UISERVICE_SESSION_MAIN_ENUM
361361 // wParam : 0
362362 // lParam : PEnumUIServiceInfo
363363 // Return : 0
364- static LONG_PTR __stdcall DoEnumAddInUIServiceSessionMain(const WPARAM wParam,const LPARAM lParam);
364+ static LONG_PTR __stdcall DoEnumAddInUIServiceSessionMain(WPARAM wParam, LPARAM lParam);
365365
366366 // SYSTEM_ADDIN_UISERVICE_SESSION_MEMBER_ENUM
367367 // wParam : 0
368368 // lParam : PEnumUIServiceInfo
369369 // Return : 0
370- static LONG_PTR __stdcall DoEnumAddInUIServiceSessionMember(const WPARAM wParam,const LPARAM lParam);
370+ static LONG_PTR __stdcall DoEnumAddInUIServiceSessionMember(WPARAM wParam, LPARAM lParam);
371371
372372 // SYSTEM_ADDIN_UISERVICE_FILESESSION_MAIN_ENUM
373373 // wParam : 0
374374 // lParam : PEnumUIServiceInfo
375375 // Return : 0
376- static LONG_PTR __stdcall DoEnumAddInUIServiceFileSessionMain(const WPARAM wParam,const LPARAM lParam);
376+ static LONG_PTR __stdcall DoEnumAddInUIServiceFileSessionMain(WPARAM wParam, LPARAM lParam);
377377
378378 //--------------------------------------------------------
379379 // UFrmNsmMainから移動
@@ -382,12 +382,12 @@
382382 // NMS_SYSTEM_MODULES_REINITIALIZE(ヘッダ未定義)処理関数
383383 // プラグインの再読み込みだから無くてもいいかな。
384384 // 仕様自体が動的読み込みするようにできてないし。
385- static LONG_PTR __stdcall DoReInitializePlugins(const WPARAM /* wParam */,const LPARAM /* lParam */);
385+ static LONG_PTR __stdcall DoReInitializePlugins(WPARAM /* wParam */, LPARAM /* lParam */);
386386
387387 // NMS_SYSTEM_RESTART(ヘッダ未定義)処理関数
388388 // こっちは再起動関数。
389389 // 独自拡張だし切ってもいいと思う。
390- static LONG_PTR __stdcall DoRestart(const WPARAM /* wParam */,const LPARAM /* lParam */);
390+ static LONG_PTR __stdcall DoRestart(WPARAM /* wParam */, LPARAM /* lParam */);
391391 };
392392 }
393393 }
Show on old repository browser