Михаил Капелько 9 月之前
父節點
當前提交
3e231475b0
共有 5 個檔案被更改,包括 32 行新增2 行删除
  1. +1
    -1
      .gitignore
  2. +1
    -1
      gen-C++
  3. +2
    -0
      gen-Swift
  4. +22
    -0
      language-Swift/Memory/src/Memory.Aux.swift
  5. +6
    -0
      language-Swift/src/test.swift

+ 1
- 1
.gitignore 查看文件

@@ -1,2 +1,2 @@
test_memory
test_memory*
__pycache__

+ 1
- 1
gen-C++ 查看文件

@@ -1,4 +1,4 @@
c++ -o test_memory \
c++ -o test_memory_C++ \
-Ilanguage-C++/Memory/src \
language-C++/Memory/src/Memory.Aux.cpp \
language-C++/Memory/src/Memory.Test.cpp \


+ 2
- 0
gen-Swift 查看文件

@@ -0,0 +1,2 @@
swiftc -o test_memory_Swift \
language-Swift/src/test.swift

+ 22
- 0
language-Swift/Memory/src/Memory.Aux.swift 查看文件

@@ -0,0 +1,22 @@
#include <map>
#include "Memory.h"


std::map<int, int> memory_generateConstPlayfield(
int n
) {
std::map<int, int> idGroups;
int id = 0;
for (int gid = 0; gid < n; ++gid) {
idGroups[id++] = gid;
idGroups[id++] = gid;
}
return idGroups;
}

func memory_generateConstPlayfield(
n: Int
) -> [Int: Int] {
var idGroups = [Int: Int]()

}

+ 6
- 0
language-Swift/src/test.swift 查看文件

@@ -0,0 +1,6 @@
print("Hello, world from Swift")
/*
std::cout
<< test_memory_generateConstPlayfield()
<< std::endl;
*/

Loading…
取消
儲存