검색결과 리스트
분류 전체보기에 해당되는 글 27건
- 2020.05.27 Source Tree Author Failed
- 2020.05.25 Log Verbosity override
- 2020.01.29 git upstream
- 2020.01.28 모든 메쉬 다시 저장
- 2019.04.16 Auto Attach 디버깅 툴(Visual Studio)
- 2019.01.04 Git Difftool MergeTool
- 2018.07.02 NDK BUILD
- 2018.03.08 생성자/파괴자 내부에서 virtual 함수 사용이 안되는(virtual 대신 일반 함수처럼 동작됨) 이유
글
Source Tree Author Failed
Mac
~/Library/Application Support/SourceTree
제거
Windows
%AppData%\..\Local\Atlassian\SourceTree
제거
글
Log Verbosity override
Config/DefaultEngine.ini
[Core.Log]
LogCategoryName=NewVerbosityLevel
ex
[Core.Log]
LogFoobar=Log
로그 카테고리 선언 참고.
foobarLog.h
DECLARE_LOG_CATEGORY_EXTERN(LogFoobar, Display, All);
foobarLog.cpp
DEFINE_LOG_CATEGORY(LogFoobar);
글
모든 메쉬 다시 저장
"Engine/Binaries/Win64/UE4Editor-Cmd.exe" "project_path" -run=ResavePackages -unattended -nopause -buildmachine -autocheckout -autocheckin -projectonly -resaveclass="StaticMesh,SkeletalMesh"
글
글
Git Difftool MergeTool
git difftool 과 git mergetool 을 이용하면 사용자 정의 편집툴을 호출할 수 있다.
이때 Users/xxx/.gitconfig 파일에 정의된 내용과 git 에 미리 정의된 편집툴을 사용한다.
.gitconfig 에 해당 툴을 정의하려면
[difftool "diffmerge"] cmd = \"C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exe\" \"$LOCAL\" \"$REMOTE\" path = C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exe [mergetool "diffmerge"] cmd = 'C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exe' -merge -result=\"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\" trustExitCode = true
와 같이 정의할 수 있다.
사용법
git difftool --tool=diffmerge fcf1695608d8451befd12198baa484c6d16e5171 dcb472ee4f2a00cffac34c9a46f42026239536fb TEST/Foobar.txt
처럼 커밋 hash 를 직접 입력할 수 있어 편리하다.
또한 git 저장소 마다
.gitattribute 를 사용하여 확장자별 미리 정의된 편집툴을 이용할 수 있다.
*.txt diff=diffmerge merge=diffmerge
위와 같이 사용할 수 있다.
이미 정의된 difftool 이나 mergetool 목록을 보고 싶으면
git difftool --tool-help
git mergetool --tool-help
위와 같이 입력.
글
NDK BUILD
https://developer.android.com/ndk/guides/ndk-build?hl=ko
글
생성자/파괴자 내부에서 virtual 함수 사용이 안되는(virtual 대신 일반 함수처럼 동작됨) 이유
https://stackoverflow.com/questions/962132/calling-virtual-functions-inside-constructors
https://isocpp.org/wiki/faq/strange-inheritance#calling-virtuals-from-ctors
1 . 생성자에서 부를 때 명확한 예
#include<string>
#include<iostream>
using namespace std;
class B {
public:
B(const string& ss) { cout << "B constructor\n"; f(ss); }
virtual void f(const string&) { cout << "B::f\n";}
};
class D : public B {
public:
D(const string & ss) :B(ss) { cout << "D constructor\n";}
void f(const string& ss) { cout << "D::f\n"; s = ss; }
private:
string s;
};
int main()
{
D d("Hello");
}
결과
B constructor
B::f
D constructor
만일 B::f 대신 D::f 를 허용한다면 D constructor 호출 이전이므로
s = ss; 에서 초기화되지 않은 string s 를 사용해야하므로 crash 가 발생할 수 있다.
C++ is protecting you from that danger. 의 차원에서 허용되지 않는다고 볼 수 있다.
2. 파괴자에서는 생성자 호출 순서의 역순으로 수행되므로
위의 클래스 예를 들어보면 D 의 파괴자 호출 후에 B 파괴자가 호출된다.
B 파괴자 내부에서 f(ss); 를 호출하여 D::f 를 호출 한다는 것도 성립할 수 없게 된다.(만일 D::f 가 호출된다면 이미 파괴된 string s 를 참조하려고 한다.)