Skip to content

Commit

Permalink
do not define DEBUG_DELAUNAY 1 :)
Browse files Browse the repository at this point in the history
  • Loading branch information
xyzxqs committed Oct 12, 2016
1 parent 9f1e98a commit b673a9f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 92 deletions.
3 changes: 1 addition & 2 deletions xlowpoly/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ add_library( # Sets the name of the library.
src/main/cpp/lowpoly.c
src/main/cpp/dilution.c
src/main/cpp/point.c
src/main/cpp/_log.c
src/main/cpp/dedup.c)
src/main/cpp/dedup.c )

# Searches for a specified prebuilt library and stores the path as a
# variable. Because system libraries are included in the search path by
Expand Down
76 changes: 0 additions & 76 deletions xlowpoly/src/main/cpp/_log.c

This file was deleted.

16 changes: 6 additions & 10 deletions xlowpoly/src/main/cpp/_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,12 @@
#ifndef XLOWPOLY_LOG_H
#define XLOWPOLY_LOG_H

#define PRINT_DEBUG_LOG
#include <android/log.h>

void _log_v(const char *tag, const char *fmt, ...);

void _log_d(const char *tag, const char *fmt, ...);

void _log_i(const char *tag, const char *fmt, ...);

void _log_w(const char *tag, const char *fmt, ...);

void _log_e(const char *tag, const char *fmt, ...);
#define _log_i(tag, ...) __android_log_print(ANDROID_LOG_INFO, tag, __VA_ARGS__)
#define _log_d(tag, ...) __android_log_print(ANDROID_LOG_DEBUG, tag, __VA_ARGS__)
#define _log_e(tag, ...) __android_log_print(ANDROID_LOG_ERROR, tag, __VA_ARGS__)
#define _log_w(tag, ...) __android_log_print(ANDROID_LOG_WARN, tag, __VA_ARGS__)
#define _log_v(tag, ...) __android_log_print(ANDROID_LOG_VERBOSE, tag, __VA_ARGS__)

#endif //XLOWPOLY_LOG_H
9 changes: 5 additions & 4 deletions xlowpoly/src/main/cpp/delaunay.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "_log.h"
#include "point.h"


//do not define DEBUG_DELAUNAY 1 :)
#define DEBUG_DELAUNAY 0

//Local Optimization Procedure
Expand Down Expand Up @@ -242,16 +242,17 @@ void trinet_point_add(const int target_point_index, const TriNet *triNet) {
#endif
for (AngNode *p = angs_head->next; p != NULL;) {
triangle_remove(p->vertex, p->subtense, triNet);
int sub_index = p->subtense->nock_vertex;
int nock = p->subtense->nock_vertex;
int arrow = p->subtense->arrow_vertex;
arcnode_add(arcs_head, p->subtense);
Arc *head = (triNet->arcs_heads)[p->vertex];
pnode_unique_add(points_head, p->vertex);
for (Arc *pa = head->next; pa != NULL;) {
if (pa->arrow_vertex == p->subtense->arrow_vertex) {
if (pa->arrow_vertex == arrow) {
arcnode_add(arcs_head, pa);
pnode_unique_add(points_head, pa->arrow_vertex);
}
if (pa->arrow_vertex == sub_index) {
if (pa->arrow_vertex == nock) {
arcnode_add(arcs_head, pa);
pnode_unique_add(points_head, pa->arrow_vertex);
}
Expand Down

0 comments on commit b673a9f

Please sign in to comment.