Source Tree Author Failed

Windows tips 2020. 5. 27. 17:00

Mac

~/Library/Application Support/SourceTree
제거

Windows

%AppData%\..\Local\Atlassian\SourceTree

제거

설정

트랙백

댓글

Log Verbosity override

Game Programming/Unreal Engine 2020. 5. 25. 23:14

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);

설정

트랙백

댓글

git upstream

Link 2020. 1. 29. 17:30

설정

트랙백

댓글

모든 메쉬 다시 저장

Game Programming/Unreal Engine 2020. 1. 28. 15:58

"Engine/Binaries/Win64/UE4Editor-Cmd.exe" "project_path" -run=ResavePackages -unattended -nopause -buildmachine -autocheckout -autocheckin -projectonly -resaveclass="StaticMesh,SkeletalMesh"

설정

트랙백

댓글

Auto Attach 디버깅 툴(Visual Studio)

Game Programming/C++ 2019. 4. 16. 15:13

설정

트랙백

댓글

Git Difftool MergeTool

Windows tips 2019. 1. 4. 10:25

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

Game Programming/Android 2018. 7. 2. 12:57

https://developer.android.com/ndk/guides/ndk-build?hl=ko


설정

트랙백

댓글

생성자/파괴자 내부에서 virtual 함수 사용이 안되는(virtual 대신 일반 함수처럼 동작됨) 이유

Game Programming/C++ 2018. 3. 8. 07:18

https://stackoverflow.com/questions/962132/calling-virtual-functions-inside-constructors

https://isocpp.org/wiki/faq/strange-inheritance#calling-virtuals-from-ctors

1 . 생성자에서 부를 때 명확한 예

  1. #include<string>
  2. #include<iostream>
  3. using namespace std;
  4. class B {
  5. public:
  6. B(const string& ss) { cout << "B constructor\n"; f(ss); }
  7. virtual void f(const string&) { cout << "B::f\n";}
  8. };
  9. class D : public B {
  10. public:
  11. D(const string & ss) :B(ss) { cout << "D constructor\n";}
  12. void f(const string& ss) { cout << "D::f\n"; s = ss; }
  13. private:
  14. string s;
  15. };
  16. int main()
  17. {
  18. D d("Hello");
  19. }

결과

  1. B constructor
  2. B::f
  3. 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 를 참조하려고 한다.)


설정

트랙백

댓글