Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
eugen.kremer committed Mar 1, 2014
1 parent bede499 commit 09a95f2
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
3 changes: 2 additions & 1 deletion common/AcceleratorHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ DWORD CALLBACK AcceleratorHook::Handler( int code, DWORD wParam, LONG lPara
if (msg && code == HC_ACTION){
bool q = msg->message == WM_QUIT;

AcceleratorHandler* handler = NULL;
EnterCriticalSection(&instance->m_CriticalSection);
for(Handlers::iterator it=instance->m_Handlers.begin(); it!=instance->m_Handlers.end(); ++it){
AcceleratorHandler* handler = *it;
handler = *it;
if (handler->execute(msg)){
msg->message = WM_NULL;
break;
Expand Down
4 changes: 2 additions & 2 deletions common/System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ HRESULT STDMETHODCALLTYPE System::decodeFrom(
*result = SysAllocStringLen(NULL, len);
res = MultiByteToWideChar(codepage, 0, buf, newlen, *result, len);

delete[] buf;
delete buf;
}
return S_OK;
}
Expand All @@ -163,7 +163,7 @@ HRESULT STDMETHODCALLTYPE System::encodeTo( int codepage, BSTR *value, BSTR *res
*result = SysAllocStringLen(NULL, len);
res = MultiByteToWideChar(0, 0, buf, newlen, *result, len);

delete[] buf;
delete buf;
}
return S_OK;
}
Expand Down
2 changes: 1 addition & 1 deletion common/System.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class CallBack :public CComDispatch<ICallBack>
mov v_ebp, ebp
}

CallBack* cb = *GetCallBack(NUM);
CallBack* cb = *CallBack::GetCallBack(NUM);
return cb->Call(v_ebp); // provide actual parameters
#else
#pragma message(": warning: Library::call not available")
Expand Down
14 changes: 6 additions & 8 deletions editor/view/EditorView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ HRESULT STDMETHODCALLTYPE CEditorView::get_selection( BSTR *value){
sci(SCI_GETSELTEXT, len, (LPARAM)buf);

*value = adjustFromCodePage(buf, -1);
delete[] buf;
delete buf;

return S_OK;
}
Expand All @@ -174,7 +174,7 @@ HRESULT STDMETHODCALLTYPE CEditorView::put_selection(BSTR *value){
char* buf = adjustToCodePage(*value);

sci(SCI_REPLACESEL, 0, (LPARAM)buf);
delete[] buf;
delete buf;

return S_OK;
}
Expand All @@ -195,10 +195,9 @@ HRESULT STDMETHODCALLTYPE CEditorView::get_files(IDispatch **result){
// prepare for getting filenames
long nbFiles;
get_files(&nbFiles);
TCHAR** filesArray = new TCHAR*[nbFiles];

TCHAR** filesArray = (TCHAR**)malloc(sizeof(TCHAR*)*nbFiles);
for(int i=0; i<nbFiles; i++){
filesArray[i] = new TCHAR[MAX_PATH];
filesArray[i] = (TCHAR*)malloc(sizeof(TCHAR)*MAX_PATH);
}

// get filenames
Expand All @@ -214,10 +213,9 @@ HRESULT STDMETHODCALLTYPE CEditorView::get_files(IDispatch **result){
// fill and free allocated Resources
for(int i=0; i<nbFiles; i++){
MyActiveSite::getInstance()->pushValueInToArr(arr, filesArray[i]);
delete[] filesArray[i];
delete filesArray[i];
}

delete[] filesArray;
delete filesArray;

*result = arr;
return S_OK;
Expand Down
2 changes: 1 addition & 1 deletion editor/view/ViewLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ HRESULT STDMETHODCALLTYPE ViewLine::get_text( BSTR *result){

*result = m_View->adjustFromCodePage(buf, -1);

delete[] buf;
delete buf;

return S_OK;
}
Expand Down
Binary file modified jN.cpp
Binary file not shown.

0 comments on commit 09a95f2

Please sign in to comment.